NixOS on ARM/Raspberry Pi 4: Difference between revisions
imported>Sorki USB boot notes |
imported>Drewrisinger Install: update GPU configuration. Remove displayManager.slim references. Add install troubleshooting steps |
||
| Line 105: | Line 105: | ||
services.xserver = { | services.xserver = { | ||
enable = true; | enable = true; | ||
displayManager. | displayManager.lightdm.enable = true; | ||
desktopManager.gnome3.enable = true; | desktopManager.gnome3.enable = true; | ||
videoDrivers = [ "fbdev" ]; | videoDrivers = [ "fbdev" ]; | ||
| Line 122: | Line 122: | ||
}; | }; | ||
hardware.deviceTree = { | hardware.deviceTree = { | ||
kernelPackage = pkgs.linux_rpi4; | |||
overlays = [ "${pkgs.device-tree_rpi.overlays}/vc4-fkms-v3d.dtbo" ]; | overlays = [ "${pkgs.device-tree_rpi.overlays}/vc4-fkms-v3d.dtbo" ]; | ||
}; | }; | ||
services.xserver = { | services.xserver = { | ||
enable = true; | enable = true; | ||
displayManager. | displayManager.lightdm.enable = true; | ||
desktopManager.gnome3.enable = true; | desktopManager.gnome3.enable = true; | ||
videoDrivers = [ "modesetting" ]; | videoDrivers = [ "modesetting" ]; | ||
| Line 166: | Line 166: | ||
Note that the Type-C USB receptacle for the Raspberry Pi 4B '''does not implement Power Delivery (USB PD)'''. This means that it is limited to whatever the power supply will provide when not negotiating power, which is most likely 5V at some undetermined power level. | Note that the Type-C USB receptacle for the Raspberry Pi 4B '''does not implement Power Delivery (USB PD)'''. This means that it is limited to whatever the power supply will provide when not negotiating power, which is most likely 5V at some undetermined power level. | ||
===First Install Issues=== | |||
Make sure that you resize the <code>NIXOS_SD</code> partition and expand the filesystem so that the initial install will have enough space for the <code>/nix/store</code>. Assuming you only have the SD card plugged in: | |||
<nowiki> | |||
$ sudo parted resizepart 2 100% | |||
$ sudo resize2fs /dev/disk/by-label/NIXOS_SD</nowiki> | |||
You might also have to add the nix channels manually. | |||
<nowiki> | |||
$ sudo mkdir -p /nix/var/nix/profiles/per-user/root/channels/ | |||
$ nix-channel --add https://nixos.org/channels/nixos-unstable nixpkgs | |||
$ nix-channel --update</nowiki> | |||
Finally, the <code>nixos-install</code> program might fail to copy your <code>configuration.nix</code> and <code>hardware-configuration.nix</code> files automatically to <code>/etc/nixos/</code>. You can do this yourself by <code>sudo cp /mnt/etc/nixos/* /etc/nixos/</code>. | |||
<hr /> | <hr /> | ||