Custom ISO Installer

How difficult would it be to create an installer that:

  1. sets up a machine?
  2. without internet?

I see here a way to automate the partitioning step:


a) the hardware is known beforehand (I do nixos-generate-config?)

b) copy over my custom configuration.nix as in the code above.

c) build (I cannot pre-generate the binary because I don’t know the hardware).

I must ensure I have everything I need on the ISO (no internet). Somehow I need to be able to reference packages on the ISO.

Maybe there is an easier way though?


Maybe it’s easier to do the install in a few manual steps:

  1. Automate partitioning and nixos-generation.

  2. Then copy the generated configuration & hardware files to a USB

  3. Build system on a remote machine

  4. Copy back to initial machine, and switch

The main difficulty I had with initial sketch above is the unpredictable interface names (and disks). Probably automatable, unsure how much work.