-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkernel.nix
56 lines (38 loc) · 1.21 KB
/
kernel.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
{ config, pkgs, lib, ... }:{
# Boot and modules
nix.buildCores= 12;
nix.maxJobs = lib.mkDefault 16;
boot.kernelPackages = with pkgs; unstable.linuxPackages_xanmod;
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" "nvme" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.supportedFilesystems = [""];
security.apparmor.enable = false;
zramSwap.enable = false;
zramSwap.algorithm = "zstd" ;
services.earlyoom.enable = true;
services.earlyoom.enableNotifications = true;
services.auto-cpufreq.enable = false;
### Boot Kernel
# Use the systemd-boot EFI boot loader.
boot = {
loader = {
systemd-boot.enable = true;
systemd-boot.memtest86.enable = true;
efi.canTouchEfiVariables = true;
timeout = 30;
};
consoleLogLevel = 3;
extraModprobeConfig = "options ec_sys write_support=1";
kernel.sysctl."vm.swappiness" = 50;
kernel.sysctl."kernel/sysrq" = 1;
kernel.sysctl."abi.vsyscall32" = 0;
kernelParams = [
"quiet"
"mitigations=off"
"radeon.dpm=1"
"intel_pstate=enable"
];
};
}