I’ve been trying to get NixOS to run on my Raspberry Pi 4 for a few days and I finally managed to build a NixOS SD card image for it using the NixOS/nixpkgs repository and the unstable NixOS channel. This GitHub issue was really helpful!

If you’d like to try it out, I’ve uploaded it here.

To use it, you’ll need to:

  1. Unpack the bz2 archive
  2. Flash your microSD card (I prefer using Balena Etcher)
  3. Put the microSD card in your Raspberry Pi 4 and boot it
  4. Run nixos-generate-config
  5. Edit /etc/nixos/configuration.nix and make sure to read the comments in the file
  6. Run nixos-rebuild switch

That should be all! 😀

Please let me know if there are any large issues with the image!