NixOS on ARM/Raspberry Pi 5: Difference between revisions

DoggoBit (talk | contribs)
Bootstrapping
DoggoBit (talk | contribs)
Line 82: Line 82:


=== Step 2: Installing NixOS ===
=== Step 2: Installing NixOS ===
Once you're running an installer image, you can use [[nixos-anywhere]] to build and install a fresh NixOS system on your Raspberry Pi 5. You can either install nixos-anywhere on your system by adding it to your system or home packages, or you can directly run it as a flake (see the repository's getting started guide).<syntaxhighlight lang="shell">
 
$ nixos-anywhere --flake .#<system> root@<hostname> --build-on remote
Once you're running an installer image, you can use [[nixos-anywhere]] to build and install a fresh NixOS system on your Raspberry Pi 5. You can either install nixos-anywhere on your system by adding it to your system or home packages, or you can directly run it as a flake (see the repository's getting started guide).
</syntaxhighlight>The nixos-raspberrypi also has an [https://github.com/nvmd/nixos-raspberrypi-demo example configuration].
 
If you simply want to install NixOS on the same SD card, make sure to remove the disko phase:<syntaxhighlight lang="shell">
$ nixos-anywhere --flake .#<system> root@<hostname> --build-on remote --phases kexec,install,reboot
</syntaxhighlight>Alternatively, you can use [[disko]] to set up your disk configuration as well (probably SSD).The nixos-raspberrypi also has an [https://github.com/nvmd/nixos-raspberrypi-demo example configuration].


== Other Solutions ==
== Other Solutions ==