Building Your Own NixOS CD
Building a NixOS CD is as easy as configuring your own computer. The
idea is to use another module which will replace
your configuration.nix to configure the system that
would be installed on the CD.
Default CD/DVD configurations are available
inside nixos/modules/installer/cd-dvd. To build them
you have to set NIXOS_CONFIG before
running nix-build to build the ISO.
$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix
Before burning your CD/DVD, you can check the content of the image by mounting anywhere like
suggested by the following command:
# mount -o loop -t iso9660 ./result/iso/cd.iso /mnt/iso