-
Notifications
You must be signed in to change notification settings - Fork 4
/
hardware-configuration.nix
64 lines (52 loc) · 1.63 KB
/
hardware-configuration.nix
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
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
hardware.cpu.intel.updateMicrocode = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices = {
cryptkey = {
device = "/dev/disk/by-uuid/0c1e8ef4-4b84-404f-a7c8-0871017aa086";
};
cryptroot = {
device = "/dev/disk/by-uuid/9782f25f-d655-4718-9b37-d96a932dd10a";
keyFile = "/dev/mapper/cryptkey";
};
cryptswap = {
device = "/dev/disk/by-uuid/eedde382-4b96-420e-8489-c581b6af1eac";
keyFile = "/dev/mapper/cryptkey";
};
};
fileSystems."/" =
{ device = "rpool/danger-root";
fsType = "zfs";
};
fileSystems."/nix" =
{ device = "rpool/nix";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "rpool/home";
fsType = "zfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/55DE-4951";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/cef80b32-0d52-48bd-9957-add0a948d1fa"; }
];
nix.maxJobs = lib.mkDefault 8;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
networking.hostId = "e9d9c1f1";
boot.initrd.postMountCommands = ''
# Don't keep the cryptkey available all the time
cryptsetup close /dev/mapper/cryptkey
'';
}