summaryrefslogtreecommitdiff
path: root/hosts/thinkpad/hardware.nix
blob: 61948b498de693dbbe7f11dedf467446b3d7c201 (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
39
40
41
42
43
{...}: {
  # hardware
  hardware.graphics.enable = true;
  hardware.bluetooth.enable = true;

  # bootloader
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi = {
    canTouchEfiVariables = true;
    efiSysMountPoint = "/boot/efi";
  };

  # 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/fe5e24c0-d35d-4722-929d-1496b7eb9872";

  # root
  fileSystems."/" = {
    device = "/dev/disk/by-uuid/e7bdadd0-0914-42ea-81c4-4449537d3477";
    fsType = "btrfs";
  };

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

  # swap
  swapDevices = [
    {device = "/dev/disk/by-uuid/01099db8-dd7a-4fe5-981a-6889fdb3735e";}
  ];
}