-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhardware-configuration.nix
46 lines (42 loc) · 1.11 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
# Minisforum UM340
{
modulesPath,
namespace,
pkgs,
...
}:
let
bootUUID = "D2E7-FE8F"; # The UUID of the boot partition.
luksUUID = "7b9c756c-ba9d-43fc-b935-7c77a70f5f1b"; # The UUID of the locked LUKS partition.
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
kernelModules = [ "kvm-amd" ];
kernelParams = [ "nvme_core.default_ps_max_latency_us=0" ]; # (Allegedly) Fixes 84 degree reading on Samsung NVMe. See https://www.reddit.com/r/unRAID/comments/s4w79b/m2_drive_bad_temp_reading_seriously_84c/
initrd.kernelModules = [
"kvm-amd"
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
# Enable support for building ARM64 packages
binfmt.emulatedSystems = [ "aarch64-linux" ];
};
# Configure the main filesystem.
${namespace}.filesystem = {
enable = true;
partitions = {
boot = "/dev/disk/by-uuid/${bootUUID}";
luks = "/dev/disk/by-uuid/${luksUUID}";
};
swapFile = {
enable = true;
size = 16384;
};
};
}