NixOS on a Pi

For a few weeks I have tried to install NixOS on a raspberry Pi without much success. I have finally managed to get NixOS to work with a GUI/Desktop environment. I kept getting stuck at the command prompt but in the end [I found a blog post](https://mtlynch.io/nixos-pi4/) that helped me.

## What I Struggled With

The first thing I struggled with was finding a version of NixOS that played nicely with Pi's processor. With some distributions you download it, install and it's easy. With NixOS it took some searching to find the right ISO image that I also had to download a tool to unzip.

## The Command Prompt That Updates

I think I could have got NixOS to work much sooner but I was confused by the command prompt. Every few seconds it gives messages about bluetooth devices and more. It made me think that the install had failed and that there was an error. I also had to learn to use the passwd command at the first prompt to set the password for the nixos user before moving forward.

## The Other Challenge

When you install NixOS on an HP laptop, or other device you can download the standard ISO, make a bootable USB stick, and then install NixOS from NixOS. With the Pi you can't do that. You have to do some things in the command line. The key step is to set the password, find the IP address and then SSH from xour usual machine. Once that is done it is easy to experiment with setting up NixOS.

## And Finally

Now that I have NixOS up and running on a Pi I can experiment with the OS. When I update the configuration file I can keep a copy of it. Any time I install Nix on a system I can re-use the config file and replicate a setup within minutes, rather than hours. I set it up on a Pi4 with 2gb of ram but I could move it to a Pi4 with 4 or 8gb of ram, when I see that it requires more ram. Now that I am at this point I can experiment with more flexibility.