From adb0c8cce1aa82eb88ccebccb1f635d4894a8822 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Mon, 22 Feb 2021 07:24:14 +0100 Subject: Update rpi config (still not working) --- machines/rpi3-amadeus/configuration.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/machines/rpi3-amadeus/configuration.nix b/machines/rpi3-amadeus/configuration.nix index 5a715f6..ba9ff57 100644 --- a/machines/rpi3-amadeus/configuration.nix +++ b/machines/rpi3-amadeus/configuration.nix @@ -5,6 +5,14 @@ ]; # NixOS wants to enable GRUB by default boot.loader.grub.enable = false; + boot.loader.raspberryPi = { + enable = true; + version = 3; + uboot.enable = true; + firmwareConfig = '' + gpu_mem=256 + ''; + }; # Enables the generation of /boot/extlinux/extlinux.conf boot.loader.generic-extlinux-compatible.enable = true; @@ -17,6 +25,9 @@ # On a Raspberry Pi 4 with 4 GB, you should either disable this parameter or increase to at least 64M if you want the USB ports to work. boot.kernelParams = ["cma=32M"]; + hardware.enableRedistributableFirmware = true; + hardware.firmware = with pkgs; [ raspberrypifw ]; + # File systems configuration for using the installer's partition layout fileSystems = { "/" = { @@ -35,7 +46,8 @@ swapDevices = [ { device = "/swapfile"; size = 1024; } ]; environment.systemPackages = with pkgs; [ - vim git curl wget usbutils + vim git curl wget + libraspberrypi ]; users.users.pi = { @@ -43,4 +55,10 @@ home = "/home/pi"; extraGroups = [ "wheel" "networkmanager" ]; }; + services.xserver = { + enable = true; + displayManager.startx.enable = true; + libinput.enable = true; + }; + } -- cgit 1.4.1