fedora-csb-system-manager
1#+TITLE: Fedora CSB - System Manager Testing
2#+FILETAGS: fedora csb system-manager vm
3
4Testing system-manager on Red Hat Fedora CSB (Corporate Standard Build).
5
6* Overview
7
8This configuration is for testing system-manager on Fedora CSB, Red Hat's managed Fedora distribution.
9
10** System Information
11
12- *OS:* Fedora CSB (Red Hat managed)
13- *Type:* Virtual Machine (test environment)
14- *Architecture:* x86_64
15- *Purpose:* Testing system-manager on non-NixOS
16
17** Components
18
19Managed by system-manager:
20- Core utilities (vim, htop, curl, git, ripgrep, fd, jq)
21- Development tools (helix)
22- Networking tools (wireguard-tools)
23
24* Scripts
25
26** create-vm.sh
27
28Creates a libvirt VM from a Fedora CSB ISO.
29
30#+begin_src bash
31# Basic usage
32./create-vm.sh ~/Downloads/fedora-csb.iso
33
34# With custom settings
35VM_NAME=fedora-csb VM_RAM=8192 VM_CPUS=4 ./create-vm.sh ~/Downloads/fedora-csb.iso
36#+end_src
37
38Environment variables:
39| Variable | Default | Description |
40|---------------+----------------------------------------------+----------------------|
41| VM_NAME | fedora-csb | VM name |
42| VM_RAM | 4096 | RAM in MB |
43| VM_CPUS | 2 | Number of CPUs |
44| VM_DISK_SIZE | 40 | Disk size in GB |
45| VM_DISK_PATH | /var/lib/libvirt/images/$VM_NAME.qcow2 | Path to disk image |
46| VM_NETWORK | default | Libvirt network |
47
48** bootstrap.sh
49
50Run inside the VM after installation to set up Nix and system-manager.
51
52#+begin_src bash
53# Copy to VM and run
54scp bootstrap.sh user@fedora-csb:~
55ssh user@fedora-csb './bootstrap.sh'
56
57# Or with custom repo/config
58REPO_URL=git@github.com:user/home.git SYSTEM_CONFIG=fedora-csb ./bootstrap.sh
59#+end_src
60
61Environment variables:
62| Variable | Default | Description |
63|---------------+--------------------------------------+--------------------------------|
64| REPO_URL | https://github.com/vdemeester/home | Git repository URL |
65| REPO_PATH | $HOME/src/home | Local path for repo |
66| SYSTEM_CONFIG | fedora-csb | System-manager config name |
67
68* Workflow
69
701. *Download ISO*: Get Fedora CSB ISO from Red Hat
71
722. *Create VM*:
73 #+begin_src bash
74 ./imperative/fedora-csb/create-vm.sh /path/to/fedora-csb.iso
75 #+end_src
76
773. *Wait for installation*: CSB installer is automated, wait for it to complete
78
794. *Get VM IP*:
80 #+begin_src bash
81 virsh domifaddr fedora-csb
82 #+end_src
83
845. *Bootstrap system-manager*:
85 #+begin_src bash
86 scp imperative/fedora-csb/bootstrap.sh user@<vm-ip>:~
87 ssh user@<vm-ip> './bootstrap.sh'
88 #+end_src
89
906. *Iterate*: Modify =systems/fedora-csb/system.nix= and rebuild:
91 #+begin_src bash
92 ssh user@<vm-ip> 'cd ~/src/home && git pull && nix build .#systemConfigs.fedora-csb && sudo ./result/bin/activate'
93 #+end_src
94
95* System-Manager Configuration
96
97The system-manager configuration is at =systems/fedora-csb/system.nix=.
98
99To rebuild and activate:
100
101#+begin_src bash
102# Build only
103nix build .#systemConfigs.fedora-csb
104
105# Build and activate
106nix build .#systemConfigs.fedora-csb && sudo ./result/bin/activate
107#+end_src
108
109* Troubleshooting
110
111** Nix not found after bootstrap
112
113Restart your shell or source the Nix profile:
114
115#+begin_src bash
116. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
117#+end_src
118
119** SELinux issues
120
121The Determinate Systems installer handles SELinux, but if you encounter issues:
122
123#+begin_src bash
124# Check SELinux status
125getenforce
126
127# Temporarily set to permissive for testing
128sudo setenforce 0
129#+end_src
130
131** VM networking issues
132
133Check libvirt network is running:
134
135#+begin_src bash
136virsh net-list --all
137virsh net-start default
138#+end_src
139
140* Notes
141
142- CSB ISO is self-automating, no Kickstart needed
143- If CSB doesn't work in VM, fall back to regular Fedora
144- System-manager works alongside Fedora's package manager (dnf)