{ config, pkgs, lib, ... }: { boot.loader.grub.enable = false; boot.loader.raspberryPi = { enable = true; version = 3; firmwareConfig = '' gpu_mem=192 dtparam=audio=on disable_overscan=1 hdmi_drive=2 disable_audio_dither=1 # Can be shortened if desired. boot_delay=10 ''; }; # This is necessary for the rpi3. boot.kernelPackages = pkgs.linuxPackages_rpi4; # Enable nonfree firmware (necessary for the rpi) hardware.enableRedistributableFirmware = true; boot.supportedFilesystems = [ "ext4" ]; # Log important messages to the system console. boot.consoleLogLevel = lib.mkDefault 7; # These are the filesystems defined on the SD image. fileSystems = { "/boot" = { device = "/dev/disk/by-label/FIRMWARE"; fsType = "vfat"; options = [ "nofail" ]; }; "/" = { device = "/dev/disk/by-label/NIXOS_SD"; fsType = "ext4"; }; }; # Prevent use of swapspace as much as possible boot.kernel.sysctl = { "vm.swappiness" = 0; }; swapDevices = [ { device = "/swap"; size = 2048; } ]; }