aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/saarni/hardware-configuration.nix
blob: 838126770b1c79a38631f21ee14f1cb5a5d45146 (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
{
  config,
  lib,
  pkgs,
  modulesPath,
  ...
}:

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

  boot = {
    kernelPackages = pkgs.linuxPackages_zen;
    initrd = {
      availableKernelModules = [
        "xhci_pci"
        "thunderbolt"
        "nvme"
        "usb_storage"
        "sd_mod"
        "i915"
        "cdc_acm"
      ];
    };
    kernelModules = [
      "kvm-intel"
      "iwlwifi"
      "iwldvm"
      "snd_hda_intel"
      "snd_soc_avs"
      "snd_sof_pci_intel_tgl"
      "tcp_bbr"
    ];
    extraModulePackages = [ ];
    kernelParams = [
      "default_hugepagesz=2M"
      "i915.enable_guc=3"
      "mitigations=off"
      "nospectre_v2"
      "snd-intel-dspcfg.dsp_driver=3"
      "transparent_hugepage=always"
      "usbcore.blinkenlights=1"
    ];
    extraModprobeConfig = ''
      options snd_hda_intel enable=0,1
    '';
  };

  fileSystems = {
    "/boot" = {
      device = "/dev/disk/by-uuid/9B7E-3D1B";
      fsType = "vfat";
      options = [
        "fmask=0022"
        "dmask=0022"
      ];
    };
    "/" = {
      device = "/dev/disk/by-uuid/3968a07a-5e37-4bdb-9e3a-6c74950fd03d";
      fsType = "ext4";
      options = [
        "defaults"
        "lazytime"
        "nodiratime"
        "barrier=1"
        "errors=remount-ro"
        "commit=30"
      ];
    };
  };

  hardware.firmware = [ pkgs.sof-firmware ];

  swapDevices = [ ];
  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}