NixOS on ARM/Raspberry Pi: Difference between revisions
imported>Lopsided98 Remove notes about pull requests that were merged a long time ago. |
imported>Leo60228 Pi 4 |
||
| Line 83: | Line 83: | ||
| Raspberry Pi 4 Model B | | Raspberry Pi 4 Model B | ||
| AArch64<br /> ''+ armv7'' | | AArch64<br /> ''+ armv7'' | ||
| | | YES* ([https://github.com/NixOS/nixpkgs/issues/63720 GitHub issue]) | ||
|} | |} | ||
''Support'' | ''Support'' | ||
* YES: Supported architecture by Nixpkgs downstream and tested to be working. | * YES: Supported architecture by Nixpkgs downstream and tested to be working. | ||
* YES*: Available in Nixpkgs downstream but experimental. | |||
* C: Community supported, and tested to be working. | * C: Community supported, and tested to be working. | ||
* C*: Community supported, unverified but should be working. | * C*: Community supported, unverified but should be working. | ||
| Line 125: | Line 126: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Raspberry Pi 4B === | |||
Support for the Pi 4 in nixpkgs is still experimental. These configurations will boot (from [https://github.com/NixOS/nixpkgs/pull/68265#issuecomment-532040372 this PR comment]): | |||
==== Without GPU ==== | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
{ pkgs, ... }: | |||
{ | |||
imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix> ]; | |||
networking.wireless.enable = false; | |||
services.xserver = { | |||
enable = true; | |||
displayManager.slim.enable = true; | |||
desktopManager.gnome3.enable = true; | |||
videoDrivers = [ "fbdev" ]; | |||
}; | |||
} | |||
</nowiki>}} | |||
==== With GPU ==== | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
{ pkgs, ... }: | |||
{ | |||
imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix> ]; | |||
networking.wireless.enable = false; | |||
hardware.opengl = { | |||
enable = true; | |||
setLdLibraryPath = true; | |||
package = pkgs.mesa_drivers; | |||
}; | |||
hardware.deviceTree = { | |||
base = pkgs.device-tree_rpi; | |||
overlays = [ "${pkgs.device-tree_rpi.overlays}/vc4-fkms-v3d.dtbo" ]; | |||
}; | |||
services.xserver = { | |||
enable = true; | |||
displayManager.slim.enable = true; | |||
desktopManager.gnome3.enable = true; | |||
videoDrivers = [ "modesetting" ]; | |||
}; | |||
boot.loader.raspberryPi.firmwareConfig = '' | |||
gpu_mem=192 | |||
''; | |||
} | |||
</nowiki>}} | |||
== Serial console== | == Serial console== | ||