I’ve discovered the most satisfying way of getting stations up and running with NixOS.
Boot an ISO I’ve built with SSH keys already installed
nixos-anywhere, to install an initial NixOS
nixos-rebuild, with my flake.
All done from the comfort of my velvet armchair. Only thing missing in this setup is something like the PiKVM, where I can emulate USB drives. Then I don’t even need to get up to insert or pull out the Live USB stick and the storage USB stick;)
Anyways, nixos-anywhere depends on x86, it seems, so, it’s not really anywhere;)
I don’t think it’s relevant to Pi itself, you’re looking at deploying your configuration to running hosts?
Consider that a Pi may not have sufficient resources to run nixos-rebuild or would be quite slow and so shipping an already built image may be “more efficient”.
x86-64 or aarch64 Linux systems with kexec support. Note: While most x86-64 Linux systems support kexec, if you’re using an architecture other than those mentioned, you may need to specify a different kexec image manually
Main / only requirement would be having kexec on target device. aarch64 is supported for latest Pi’s versions.
For my Pis I just used to build a custom image and then flash that to an SD card.
For updates I built them on my laptop and pushed them to the Pi’s with simple nixos-rebuild
However I stopped doing it this way because I wanted to encrypt the SD card and now use UEFI on the Pis and install NixOS like on any other computer.
The updates can still work in the same way but I’ve enabled automatic updates on the Pis and they rebuild themselves during the night.
A Pi with 4GB RAM plus Swap should be enough depending on your setup.