I was trying to get our new container-based NixOS tests working.
Should be simple, right? Run nixos-rebuild inside a container, verify the configuration applied correctly, done.
Instead, I watched Nix attempt to build what felt like half of nixpkgs from sourceā¦
We’ve been working on running NixOS tests inside systemd-nspawn containers rather than full QEMU VMs. It’s faster, uses fewer resources, and works in the Nix build sandbox. The test modifies a NixOS configuration and runs nixos-rebuild switch to apply it.