# Golden NixOS dev image for nina testing — the reproducible "exact starting # snapshot". Built once into a qcow2 (see build-golden.sh); Kiln boots a fresh # throwaway overlay from it per run. # # Mirrors the test environment from the Kiln brief (§2.3): NixOS 24.11, # test-primary host, git/curl/vim/htop/ripgrep, America/New_York. { config, pkgs, ... }: { imports = [ ./hardware-configuration.nix ]; # BIOS GRUB on the virtio disk — avoids needing UEFI/OVMF firmware under qemu. boot.loader.grub = { enable = true; device = "/dev/vda"; }; # Serial console so the installed image is drivable headless (qemu -nographic). # Keep a normal vga console too. boot.kernelParams = [ "console=ttyS0,115200" "console=tty0" ]; networking.hostName = "test-primary"; networking.useDHCP = true; time.timeZone = "America/New_York"; environment.systemPackages = with pkgs; [ git curl vim htop ripgrep ]; # Headless driving: autologin root on the serial console so the build/boot # harness can run commands without credentials. services.getty.autologinUser = "root"; services.openssh = { enable = true; settings.PermitRootLogin = "yes"; settings.PasswordAuthentication = true; }; # Test VM only — known password, never a real secret. users.users.root.password = "nixos"; # nina's config (brief §2.2). Written on activation so it stays in this file # rather than as imperative state. confirm=false auto-accepts; teach=true # echoes the underlying command; color=true enables ANSI the checks verify. system.activationScripts.ninaConf.text = '' cat > /root/.nina.conf <<'EOF' editor = vim generations = 5 confirm = false teach = true color = true [machine] name = test-primary config = /etc/nixos local = true default = true [machine] name = test-remote host = 192.168.100.2 user = testuser ssh_key = /home/testuser/.ssh/test_key EOF ''; system.stateVersion = "24.11"; }