summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2025-06-16 12:07:25 +0200
committertv <tv@krebsco.de>2025-06-16 12:07:25 +0200
commit7e3704c19f42c33234cb1ec3bc38ea6ed5443e56 (patch)
treed8af95567b09cad18e535475f32c2d04cb81e008
parent07eda24cd1e75a6e5ecf5d8dda68252099335d35 (diff)
earlyoom: init config module
-rw-r--r--configs/earlyoom.nix10
-rw-r--r--systems/alnus/config.nix7
-rw-r--r--systems/xu/config.nix1
3 files changed, 12 insertions, 6 deletions
diff --git a/configs/earlyoom.nix b/configs/earlyoom.nix
new file mode 100644
index 0000000..1249c7a
--- /dev/null
+++ b/configs/earlyoom.nix
@@ -0,0 +1,10 @@
+{ lib, ... }: {
+ services.earlyoom.enable = true;
+ systemd.services.earlyoom.environment.EARLYOOM_ARGS = lib.mkForce (toString [
+ "-m 5"
+ "-s 10"
+ "-r 0"
+ "--prefer '(^|/)chromium$'"
+ ]);
+
+}
diff --git a/systems/alnus/config.nix b/systems/alnus/config.nix
index 8af12fe..a3d1e9a 100644
--- a/systems/alnus/config.nix
+++ b/systems/alnus/config.nix
@@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }: {
imports = [
../../configs/hw/x220.nix
+ ../../configs/earlyoom.nix
../../configs/exim-retiolum.nix
../../configs/retiolum.nix
];
@@ -48,12 +49,6 @@
networking.networkmanager.enable = true;
- services.earlyoom.enable = true;
- services.earlyoom.freeMemThreshold = 5;
- systemd.services.earlyoom.environment.EARLYOOM_ARGS = toString [
- "--prefer '^(Web Content|Privileged Cont)$'" # firefox tabs
- ];
-
services.libinput.enable = false;
services.xserver = {
diff --git a/systems/xu/config.nix b/systems/xu/config.nix
index 603d0d4..abf433c 100644
--- a/systems/xu/config.nix
+++ b/systems/xu/config.nix
@@ -4,6 +4,7 @@
imports = [
../../configs/autotether.nix
../../configs/hw/x220.nix
+ ../../configs/earlyoom.nix
../../configs/exim-retiolum.nix
../../configs/gitconfig.nix
../../configs/gitrepos.nix