initial commit

This commit is contained in:
Felix Buehler 2020-11-16 21:14:46 +01:00
commit 7517f318dc
55 changed files with 1401 additions and 0 deletions

26
hardware/raspberrypi4.nix Normal file
View file

@ -0,0 +1,26 @@
{ config, pkgs, lib, ... }:
{
# Boot
boot.loader.grub.enable = false;
boot.loader.raspberryPi.enable = true;
boot.loader.raspberryPi.version = 4;
boot.loader.raspberryPi.firmwareConfig = "
# 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
# Disable SD-Card pools
dtparam=sd_pool_once=on";
# 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; }];
}

20
hardware/t14.nix Normal file
View file

@ -0,0 +1,20 @@
{ config, lib, ... }:
{
boot = {
# acpi_call makes tlp work for newer thinkpads
kernelModules = [ "acpi_call" ];
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
# Force use of the thinkpad_acpi driver for backlight control.
# This allows the backlight save/load systemd service to work.
kernelParams = [ "acpi_backlight=native" ];
# video driver
initrd.kernelModules = [ "i915" ];
};
services.fstrim.enable = lib.mkDefault true;
# Special power management settings for ThinkPads
services.tlp.enable = true;
}