NixOS on ARM/Raspberry Pi 4: Difference between revisions
Tags: Reverted Visual edit |
undo accidental chinese translation Tags: Manual revert Visual edit |
||
Line 27: | Line 27: | ||
|} | |} | ||
</div> | </div> | ||
Raspberry | The Raspberry Pi family of devices is a series of single-board computers made by the Raspberry Pi Foundation. They are all based on Broadcom System-on-a-chip (SoCs). | ||
== | == Status == | ||
Raspberry Pi | The Raspberry Pi 4 Family is only supported as '''AArch64'''. Use as armv7 is community supported. | ||
== Board-specific | == Board-specific installation notes == | ||
First follow the [[NixOS_on_ARM#Installation|generic installation steps]] to get the installer image and install using the [[NixOS_on_ARM#NixOS_installation_.26_configuration|installation and configuration steps]]. | |||
Raspberry Pi | The Raspberry Pi 4B works with the [https://hydra.nixos.org/job/nixos/trunk-combined/nixos.sd_image.aarch64-linux generic SD image]. | ||
Sample instructions for [https://nix.dev/tutorials/installing-nixos-on-a-raspberry-pi installing NixOS on a Raspberry Pi] are available at nix.dev. | |||
{{warning| | {{warning| Note that the Raspberry Pi 4 has two HDMI outputs, and apparently sometimes the user prompt for the console/TTY is displayed on HDMI 1 while the boot process is displayed on HDMI 0 (this may even [https://raspberrypi.stackexchange.com/a/112071/149250 be the case] with the official (non NixOs) non-graphical lite image). So if after the message "Welcome on NixOs" at the end of phase 2 your screen goes black/disconnects, try to use the other HDMI port. See the related bug [https://github.com/NixOS/nixpkgs/issues/179701 here].}} | ||
Note that the Raspberry Pi 4 has two HDMI outputs, and apparently sometimes the user prompt for the console/TTY is displayed on HDMI 1 while the boot process is displayed on HDMI 0 (this may even [https://raspberrypi.stackexchange.com/a/112071/149250 be the case] with the official (non NixOs) non-graphical lite image). So if after the message "Welcome on NixOs" at the end of phase 2 your screen goes black/disconnects, try to use the other HDMI port. See the related bug [https://github.com/NixOS/nixpkgs/issues/179701 here].}} | |||
=== | === Configuration === | ||
Using <code>nixos-generate-config</code> will generate the required minimal configuration. | |||
Raspberry | Raspberry Pi 4 is well-supported on modern kernels. However, if you encounter issues with GPU support or other deviceTree quirks, you may wish to add the nixos-hardware channel: | ||
<code> | <code> | ||
Line 91: | Line 90: | ||
Now reboot the device so it can update the firmware from the boot partition. | Now reboot the device so it can update the firmware from the boot partition. | ||
=== | === GPU support === | ||
The following configuration samples are built on the assumption that they are added to an already working configuration. They are not complete configurations. | |||
==== Without GPU ==== | ==== Without GPU ==== | ||
Line 148: | Line 147: | ||
If you're running headless, you can also disable HDMI audio and force use of the headphones jack by adding <code>hdmi_ignore_edid_audio=1</code> on a line below <code>dtparam=audio=on</code>. | If you're running headless, you can also disable HDMI audio and force use of the headphones jack by adding <code>hdmi_ignore_edid_audio=1</code> on a line below <code>dtparam=audio=on</code>. | ||
=== | === Networking === | ||
Ethernet and wifi interfaces should work out of the box. In addition to normal network configuration, consider disabling wifi powersaving if you experience slowness or issues with the host becoming unreachable on the network shortly after boot. For NetworkManager, the following configuration is sufficient: | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> |