summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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