summaryrefslogtreecommitdiff
path: root/hosts/kaworu/hardware.nix
blob: 740baae626701da8c88a2aebecda5528c2f09707 (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
44
45
{
  lib,
  pkgs,
  ...
}: {
  # kernel modules
  boot.initrd.availableKernelModules = [
    "nvme"
    "xhci_pci"
    "ahci"
    "usbhid"
    "usb_storage"
    "sd_mod"
  ];
  boot.initrd.kernelModules = [];
  boot.kernelModules = ["kvm-amd"];
  boot.extraModulePackages = [];
  boot.kernelPackages = lib.mkForce pkgs.cachyosKernels.linuxPackages-cachyos-latest-lto-zen4;

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

  # luks device
  boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/694c8086-d64a-466a-a687-378412964867";
  boot.initrd.luks.devices."swap".device = "/dev/disk/by-uuid/1d90327c-fe57-4f02-97b7-14062b37429f";

  # root
  fileSystems."/" = {
    device = "/dev/disk/by-uuid/dee54096-49a6-45d9-a347-cbe13374f3b4";
    fsType = "btrfs";
  };

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

  # swap
  swapDevices = [
    {device = "/dev/disk/by-uuid/24871700-814f-40d0-a3e2-8624f2e99f44";}
  ];
}