From 3e9aa3f842d98cfd45a88995a313ca57e9d66df8 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Tue, 24 Feb 2026 12:21:01 +1000 Subject: [PATCH] Change swap settings --- hosts/modules/base.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 ];