aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/pihlaja/hardware-configuration.nix
blob: 1e81932aeb5e26e1569899b9938d2229fbf7dd68 (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
79
80
# Do not modify this file!  It was generated bynixos-generate-config
# and may be overwritten by future invocations.  Please make changes
# to /etc/nixos/configuration.nix instead.
{
  config,
  lib,
  pkgs,
  modulesPath,
  ...
}:

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

  boot = {
    kernelPackages = pkgs.linuxPackages;
    kernelParams = [
      "NVreg_PreserveVideoMemoryAllocations=1"
      "mitigations=off"
      "nospectre_v2"
      "nvidia_drm.fbdev=1"
      "nvidia_drm.modeset=1"
      "transparent_hugepage=always"
    ];
    initrd = {
      luks.devices."luks-a47a6087-e6bf-4e8d-a034-2229259c38f5".device =
        "/dev/disk/by-uuid/a47a6087-e6bf-4e8d-a034-2229259c38f5";
      availableKernelModules = [
        "cdc_acm"
        "ahci"
        "iwldvm"
        "iwlwifi"
        "nvme"
        "sd_mod"
        "usb_storage"
        "usbhid"
        "xhci_pci"
        "nvidia"
        "nvidia_drm"
        "nvidia_modeset"
        "nvidia_uvm"
      ];
      luks.devices."luks-1efa1182-2964-49bf-a413-fb51bd7b107f".device =
        "/dev/disk/by-uuid/1efa1182-2964-49bf-a413-fb51bd7b107f";
    };
    kernelModules = [
      "tcp_bbr"
      "iwldvm"
      "iwlwifi"
      "k10temp"
      "kvm-amd"
    ];
    extraModulePackages = [ ];
  };

  fileSystems."/" = {
    device = "/dev/disk/by-uuid/eecfd181-138c-4c90-add6-2ef528d5dbb4";
    fsType = "ext4";
  };

  fileSystems."/data" = {
    device = "/dev/disk/by-uuid/a02a4e78-32ea-40e6-8398-087bfd8dca93";
    fsType = "ext4";
    options = [ "nofail" ];
  };

  fileSystems."/boot" = {
    device = "/dev/disk/by-uuid/A4F5-0899";
    fsType = "vfat";
    options = [
      "fmask=0077"
      "dmask=0077"
    ];
  };

  swapDevices = [ { device = "/dev/disk/by-uuid/d0e5a93d-18a7-4d24-893c-d2417c3d5043"; } ];

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