nixos/hardware/raspberrypi4.nix

32 lines
830 B
Nix
Raw Normal View History

2020-11-16 21:14:46 +01:00
{ config, pkgs, lib, ... }:
{
# Boot
boot.loader.grub.enable = false;
boot.loader.raspberryPi.enable = true;
boot.loader.raspberryPi.version = 4;
2021-03-10 13:20:19 +01:00
boot.loader.raspberryPi.firmwareConfig = ''
2020-11-16 21:14:46 +01:00
# Disable the ACT LED.
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
# Disable the PWR LED.
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off
2021-03-10 13:20:19 +01:00
# Disable ethernet port LEDs
dtparam=eth0_led=4
dtparam=eth1_led=4
2020-11-16 21:14:46 +01:00
# Disable SD-Card pools
2021-03-10 13:20:19 +01:00
dtparam=sd_pool_once=on
'';
2020-11-16 21:14:46 +01:00
# Kernel configuration
boot.kernelPackages = pkgs.linuxPackages_rpi4;
boot.kernelParams = [ "cma=64M" "console=tty0" ];
# Enable additional firmware (such as Wi-Fi drivers).
hardware.enableRedistributableFirmware = true;
#swapDevices = [{ device = "/swapfile"; size = 1024; }];
}