My NixOS and Home Manager configurations
1{ styx, ... }:
2{
3 styx.performance = {
4 nixos.boot = {
5 kernel.sysctl = {
6 "transparent_hugepage" = "always";
7 "vm.nr_hugepages_defrag" = 0;
8 "ipcs_shm" = 1;
9 "default_hugepagez" = "1G";
10 "hugepagesz" = "1G";
11 "vm.compact_memory" = 0;
12 };
13 };
14 provides = {
15 responsive = {
16 includes = [ styx.performance ];
17 nixos.boot = {
18 kernel.sysctl."vm.swappiness" = 1;
19 kernelParams = [
20 "nowatchdog"
21 "nosoftlockup"
22 "audit=0"
23 "skew_tick=1"
24 "threadirqs"
25 "preempt=full"
26 "nohz_full=all"
27 ];
28 };
29 };
30 max = {
31 includes = [ styx.performance._.responsive ];
32 nixos.boot.kernelParams = [
33 "usbcore.autosuspend=60"
34 "workqueue.power_efficient=false"
35 "cpufreq.default_governor=performance"
36 ];
37 };
38 };
39 };
40}