README.md

1.7 KB · raw

rendered · source

1# nina test VM — golden NixOS dev image23A reproducible NixOS 24.11 dev image for exercising nina, built once and booted4as disposable copy-on-write overlays so every run starts from the exact same5snapshot. Runs under qemu (TCG) on Apple Silicon — x86_64 emulation, so slow.67## Files89- `configuration.nix` — the golden system's exact starting state (the spec).10  Serial console + root autologin (headless drivable), BIOS GRUB on `/dev/vda`,11  the brief's packages, `~/.nina.conf`, hostname `test-primary`.12- `install.sh` — runs inside the minimal installer: partition, `nixos-install`.13- `build-golden.sh` — host orchestration: boots the ISO headless and drives the14  scripted install over serial, producing the golden qcow2.15- `boot-overlay.sh` — boots a throwaway overlay of the golden image, runs a16  command (default: nina smoke test), discards the overlay.1718## Build the golden image (once, slow)1920```sh21# needs the NixOS 24.11 minimal x86_64 ISO and a linux nina binary22./build-golden.sh /tmp/nixvm/nixos-24.11-minimal-x86_64.iso \23                  /tmp/nina-linux/bin/nina \24                  /tmp/nixvm/golden.qcow225```2627The linux nina binary comes from the nina repo:28`zig build -Dtarget=x86_64-linux-musl -Doptimize=ReleaseSafe -p /tmp/nina-linux`.2930## Boot a disposable copy3132```sh33./boot-overlay.sh /tmp/nixvm/golden.qcow2            # nina smoke test34./boot-overlay.sh /tmp/nixvm/golden.qcow2 'nina status'35```3637The golden image is never mutated. Kiln can also boot it directly with38`kiln chamber run --os /tmp/nixvm/golden.qcow2` (fresh overlay per run).3940Artifacts (ISO, golden.qcow2) live outside the repo (`/tmp/nixvm`); only the41build inputs are version-controlled here.