Profpatsch/machines/profpatsch/profpatsch-thinkpad.nix
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# hardware-specific configuration for Profpatsch’s thinkpads.
{ cpuType }:
assert cpuType == "intel" || cpuType == "amd";

{ lib, config, pkgs, ... }:

{
  config = {
    boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
    boot.loader.systemd-boot.enable = true;
    boot.loader.grub.enable = false;

    # Enables drivers, acpi, power management
    profpatsch.hardware.thinkpad = {
      enable = true;
      inherit cpuType;
    };

    # profpatsch.services.upower.enable = lib.mkDefault true;
  };
}