Change swap settings

This commit is contained in:
Alexander Wainwright
2026-02-24 12:21:01 +10:00
parent f33d6be892
commit 3e9aa3f842

View File

@@ -19,8 +19,16 @@
# enable zram. not totally sure if this does it in physical ram or just swap
zramSwap.enable = true;
boot.kernel.sysctl = {
"vm.swappiness" = 10;
};
# enable earlyoom to stop the system becoming unresponsive when out of ram
services.earlyoom.enable = true;
services.earlyoom = {
enable = true;
freeMemThreshold = 10;
freeSwapThreshold = 90;
};
networking.firewall.allowedTCPPorts = [ 8000 8080 ];