diff --git a/hosts/modules/base.nix b/hosts/modules/base.nix index f203480..c172ff8 100644 --- a/hosts/modules/base.nix +++ b/hosts/modules/base.nix @@ -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 ];