NixOS on ARM/Raspberry Pi 4: Difference between revisions
imported>Waschtl removed general, non nixOS specific, Raspberry Pi Information |
imported>N0nameuser fix information about minimal rpi4 config, |
||
Line 37: | Line 37: | ||
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]]. | 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]]. | ||
The Raspberry Pi 4B works with | 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. | Sample instructions for [https://nix.dev/tutorials/installing-nixos-on-a-raspberry-pi installing NixOS on a Raspberry Pi] are available at nix.dev. | ||
Line 45: | Line 45: | ||
=== Configuration === | === Configuration === | ||
Using <code>nixos-generate-config</code> will generate the required minimal configuration. | |||
For better GPU Support and some deviceTree quirks add the nixos-hardware channel: | |||
<code>nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware</code> | |||
For better GPU Support | |||
<code> | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
{ config, pkgs, lib, ... }: | { config, pkgs, lib, ... }: | ||
{ | { | ||
imports = | |||
[ | |||
<nixos-hardware/raspberry-pi/4> | |||
./hardware-configuration.nix | |||
]; | ]; | ||
hardware = { | |||
raspberry-pi."4".apply-overlays-dtmerge.enable = true; | |||
deviceTree = { | |||
enable = true; | enable = true; | ||
filter = "*rpi-4-*.dtb"; | |||
}; | }; | ||
}; | }; | ||
console.enable = false; | |||
environment.systemPackages = with pkgs; [ | |||
libraspberrypi | |||
raspberrypi-eeprom | |||
]; | |||
system.stateVersion = "23.11"; | |||
system.stateVersion = " | |||
} | } | ||
</nowiki>}} | </nowiki>}} |