August 14th, 2024

NixOS, Raspberry Pi and Me

Farid Zakaria upgraded his Raspberry Pi 4 with NixOS, improving his home network despite challenges in cross-compiling and module requirements, while advocating for better documentation and community feedback.

Read original articleLink Icon
NixOS, Raspberry Pi and Me

Farid Zakaria discusses his experience setting up a Raspberry Pi 4 with NixOS, highlighting his dissatisfaction with his home networking setup and the steps he took to improve it. He installed Ubiquiti access points and created a home server, despite having limited internet speeds from Comcast. Zakaria shares his configuration for running NixOS on the Raspberry Pi, noting the challenges he faced, particularly with cross-compiling and the necessity of certain modules. He emphasizes the need for clearer guidance on setting up NixOS for Raspberry Pi, given its popularity in the Internet of Things space. His configuration includes disabling ZFS to expedite the image-building process and using emulation for building the image on an x86_64 machine. He invites feedback on his configuration and expresses a desire for a more straightforward setup process for NixOS on Raspberry Pi.

- Farid Zakaria upgraded his Raspberry Pi 4 to run NixOS while improving his home networking setup.

- He faced challenges with cross-compiling and module requirements during the setup process.

- Zakaria emphasizes the need for better documentation for NixOS on Raspberry Pi.

- His configuration includes specific adjustments to optimize the image-building process.

- He encourages community feedback to enhance his NixOS setup.

Link Icon 5 comments
By @TobTobXX - 6 months
I have a nix flake that builds an ISO for the Pi. It is a readonly system and only does network bridging between the wifi iface and the ethernet (bc. my internet acces is... difficult). It's pragmatic an probably not best-practice, but it works:

https://git.sr.ht/~tobtobxx/gatetobtob

By @irusensei - 6 months
I have a hard time making NixOS work on my Rockpro64s. Installer ISO boots fine through TOW-boot UEFI but installed system never boots. The github projects to produce images don’t actually work for current version (something related to what’s available in hydra aparently) and even if I use the old versions as soon as I update the kernel it breaks. It simply doesn’t boot.

Meanwhile Fedora 40 installs like a champ from the default aarch64 iso with just a warning about EFI variables (which is expected since tow-boot is not really providing a complete uefi environment).

I suspect it’s probably some voodoo formula to manage the device trees. Those github flakes to generate imsges are pulling an entire root tarball from hydra so I’m assuming there is something done there that is not obvious.

By @seemaze - 6 months
I've been wanting to try NixOS, but I've also had great success running Alpine on my raspberry pis as a read only OS from ram. Rock solid, simple, and good package availability.