From 1c3b826c7328cd596528c8f18bf2c0d6de37cfaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ryan4yin=20=7C=20=E4=BA=8C=E8=8A=B1?= Date: Mon, 21 Sep 2026 01:41:26 +0800 Subject: [PATCH] fix(kubevirt): use the correct earlyoom option name (#281) services.earlyoom.freeMemThresholdPercent does not exist in this nixpkgs; the module exposes freeMemThreshold/freeSwapThreshold. Just enable earlyoom with its defaults (trigger at 10% free mem/swap). --- lib/genKubeVirtHostModule.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/genKubeVirtHostModule.nix b/lib/genKubeVirtHostModule.nix index d1704bbe..5c41a79e 100644 --- a/lib/genKubeVirtHostModule.nix +++ b/lib/genKubeVirtHostModule.nix @@ -58,11 +58,8 @@ in # zram itself is provided by modules/nixos/base/zram.nix (enabled by default). # Kill the greediest process before the host starts thrashing / gets OOM-killed. - services.earlyoom = { - enable = true; - freeMemThresholdPercent = 5; - freeSwapThresholdPercent = 5; - }; + # (defaults: trigger at 10% free mem / swap, kill hard at half of that.) + services.earlyoom.enable = true; environment.systemPackages = with pkgs; [ # Validate Hardware Virtualization Support via: