Unattended install via usb stick

@tfc and I are currently working on a nix.dev tutorial to deploy a fresh NixOS via SSH with nixos-anywhere and partitioning with disko. The difference to what you’re looking for will be minimal.

I currently only have the relevant code in a private repo, but the idea is that you define a regular installer image, and add a tiny extra script that is launched on login and essentially runs:

${machine.config.system.build.diskoScript}
nixos-install --no-root-password --no-channel-copy --system ${machine.config.system.build.toplevel}
reboot

Conveniently this incorporates the entire store path closure in the image, leading to a fully offline installation.

4 Likes