aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/kataja/hardware-configuration.nix
blob: d8a3ea83656c3eb25c40d9e86e6840bc3fb67050 (plain) (blame)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
  config,
  lib,
  pkgs,
  modulesPath,
  ...
}:

{
  imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

  boot = {
    kernelPackages = pkgs.linuxPackages_zen;
    initrd = {
      luks.devices = {
        "luks-b3e9864c-2a40-43d7-b1a0-51f3b2ec42bc".device =
          "/dev/disk/by-uuid/b3e9864c-2a40-43d7-b1a0-51f3b2ec42bc";
        "luks-b9b738dc-8554-41d9-82f9-042663b52e79".device =
          "/dev/disk/by-uuid/b9b738dc-8554-41d9-82f9-042663b52e79";
      };
      availableKernelModules = [
        "ahci"
        "amdgpu"
        "cdc_acm"
        "mt7921e"
        "nvme"
        "r8169"
        "sd_mod"
        "usb_storage"
        "usbhid"
        "xhci_pci"
      ];
    };
    kernelParams = [
      "amdgpu.modeset=1"
      "default_hugepagesz=2M"
      "mitigations=off"
      "nospectre_v2"
      "transparent_hugepage=always"
    ];
    kernelModules = [
      "iwlwifi"
      "k10temp"
      "kvm-amd"
      "snd_hda_intel"
      "tcp_bbr"
    ];
    extraModulePackages = [ ];
  };

  fileSystems = {
    "/boot" = {
      device = "/dev/disk/by-uuid/4121-BEC3";
      fsType = "vfat";
      options = [
        "fmask=0077"
        "dmask=0077"
      ];
    };
    "/" = {
      device = "/dev/disk/by-uuid/3e7f6b6b-b656-4f42-b314-f447e2562718";
      fsType = "ext4";
      options = [
        "defaults"
        "lazytime"
        "nodiratime"
        "barrier=1"
        "errors=remount-ro"
        "commit=30"
      ];
    };
  };

  swapDevices = [ { device = "/dev/disk/by-uuid/97641877-607c-46cd-853d-e431c8a90dc2"; } ];

  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}