aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/kataja/hardware-configuration.nix
blob: 5d1d1b7ad4ceb586fcd1d5e3f30fdc291960b10a (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
# 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_zen;
    initrd = {
      luks.devices."luks-b3e9864c-2a40-43d7-b1a0-51f3b2ec42bc".device =
        "/dev/disk/by-uuid/b3e9864c-2a40-43d7-b1a0-51f3b2ec42bc";
      availableKernelModules = [
        "ahci"
        "amdgpu"
        "mt7921e"
        "nvme"
        "r8169"
        "sd_mod"
        "usb_storage"
        "usbhid"
        "xhci_pci"
        "cdc_acm"
      ];
    };
    kernelParams = [
      "amdgpu.modeset=1"
      "default_hugepagesz=2M"
      "mitigations=off"
      "nospectre_v2"
      "transparent_hugepage=always"
    ];
    kernelModules = [
      "k10temp"
      "kvm-amd"
      "snd_hda_intel"
      "tcp_bbr"
    ];
    extraModulePackages = [ ];
  };

  fileSystems."/" = {
    device = "/dev/disk/by-uuid/3e7f6b6b-b656-4f42-b314-f447e2562718";
    fsType = "ext4";
  };

  boot.initrd.luks.devices."luks-b9b738dc-8554-41d9-82f9-042663b52e79".device =
    "/dev/disk/by-uuid/b9b738dc-8554-41d9-82f9-042663b52e79";

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

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

  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
  # (the default) this is the recommended approach. When using systemd-networkd it's
  # still possible to use this option, but it's recommended to use it in conjunction
  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
  # networking.useDHCP = lib.mkDefault true;
  # networking.interfaces.eno1.useDHCP = lib.mkDefault true;
  # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
  # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;

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