mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-08-29 22:57:16 +02:00
fix(nixos): gate zram kernel sysctl tunings behind modules.zram.enable
The zram module was auto-imported on all hosts via base scanPaths, and its swappiness=180/page-cluster=0 tunings leaked onto hosts that disabled zram (e.g. idols-ai with a disk swapfile, pushing cold anon pages to disk swap). Wrap the whole module in modules.zram.enable (default true); idols-ai now turns off zram and its tunings with a single switch.
This commit is contained in:
@@ -39,7 +39,8 @@ in
|
||||
];
|
||||
|
||||
# Zram consumes physical memory for compression, which can cause a deadlock and system hang if the model size approaches the physical memory limit.
|
||||
zramSwap.enable = lib.mkForce false;
|
||||
# Disable the whole module (zram device + its swappiness=180 sysctl tunings); this host uses a disk swapfile instead.
|
||||
modules.zram.enable = false;
|
||||
|
||||
services.sunshine.enable = false;
|
||||
services.tuned.ppdSettings.main.default = lib.mkForce "performance";
|
||||
|
||||
Reference in New Issue
Block a user