This repository has been archived on 2024-07-08. You can view files and clone it, but cannot push or open issues or pull requests.
nix-config-tn/iso
2024-03-17 21:44:59 +11:00
..
iso.nix feat: add iso POC 2024-03-17 21:44:59 +11:00
README.md feat: add iso POC 2024-03-17 21:44:59 +11:00

ISO Image builds

A minimal NixOS install iso build.

Mainly useful for force-enabling sshd with my public key to allow headless deployments.

https://nixos.wiki/wiki/Creating_a_NixOS_live_CD

Building

cd iso
nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix

Checking image contents

$ mkdir mnt
$ sudo mount -o loop result/iso/nixos-*.iso mnt
$ ls mnt
boot  EFI  isolinux  nix-store.squashfs  version.txt
$ umount mnt

Testing image in QEMU

$ nix-shell -p qemu
$ qemu-system-x86_64 -enable-kvm -m 256 -cdrom result/iso/nixos-*.iso