From 956267abb82174b94b8e8d19dd7b5de2037073d7 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Thu, 4 Feb 2021 10:31:16 +0100 Subject: machines/profpatsch/base-workstation: enable earlyoom --- machines/profpatsch/base-workstation.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'machines/profpatsch/base-workstation.nix') diff --git a/machines/profpatsch/base-workstation.nix b/machines/profpatsch/base-workstation.nix index 42ed0311..dab68006 100644 --- a/machines/profpatsch/base-workstation.nix +++ b/machines/profpatsch/base-workstation.nix @@ -42,6 +42,14 @@ in { # Enables drivers, acpi, power management vuizvui.hardware.thinkpad.enable = true; + # the kernel OOM is not good enough without swap, + # and I don’t like swap. This kills the most hoggy + # processes when the system goes under a free space limit + services.earlyoom = { + enable = true; + freeMemThreshold = 5; # <5% free + }; + ################### # Graphical System -- cgit 1.4.1