summaryrefslogtreecommitdiff
path: root/hosts/thinkpad/hardware.nix
blob: 9d5833301867761163976db848507b8b9be8c791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{inputs, ...}: {
  # external defaults
  imports = [
    inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-7th-gen
  ];

  # kernel modules
  boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
  boot.initrd.kernelModules = [];
  boot.kernelModules = ["kvm-intel"];
  boot.extraModulePackages = [];

  # firmware
  hardware.enableRedistributableFirmware = true;
  hardware.cpu.intel.updateMicrocode = true;

  # luks device
  boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/b94c88f4-a74e-42b6-b525-d69dc70cbe09";
  boot.initrd.luks.devices."swap".device = "/dev/disk/by-uuid/61866c6a-da39-4a0e-97aa-1437e8827621";

  # root
  fileSystems."/" = {
    device = "/dev/disk/by-uuid/71e9cd8e-1f62-4587-bcfe-9ee74eb25d53";
    fsType = "btrfs";
  };

  # boot
  fileSystems."/boot" = {
    device = "/dev/disk/by-uuid/5116-3132";
    fsType = "vfat";
    options = ["fmask=0022" "dmask=0022"];
  };

  # swap
  swapDevices = [
    {device = "/dev/disk/by-uuid/8e876b25-899d-40ea-b9e5-764a38d818b7";}
  ];
}