commit ebd795b259aa91a72406e10c8f38989d90a27349
parent 62b21c259bc0c7801324d0498acac9f0146204c9
Author: Katja (zaphyra) <git@ctu.cx>
Date: Sun, 25 May 2025 21:00:38 +0200
parent 62b21c259bc0c7801324d0498acac9f0146204c9
Author: Katja (zaphyra) <git@ctu.cx>
Date: Sun, 25 May 2025 21:00:38 +0200
config/nixos/modules/services/earlyoom: fix required bc it now uses `escapeShellArg` on `nixpkgs-25.05`
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/config/nixos/modules/services/earlyoom.nix b/config/nixos/modules/services/earlyoom.nix @@ -30,11 +30,18 @@ in services.earlyoom = { enable = true; enableNotifications = true; - extraArgs = [ - "--ignore-root-user" - (lib.mkIf (cfg.avoid != [ ]) "--avoid '(^|/)(${lib.concatStringsSep "|" cfg.avoid})$'") - (lib.mkIf (cfg.prefer != [ ]) "--avoid '(^|/)(${lib.concatStringsSep "|" cfg.prefer})$'") - ]; + extraArgs = + [ + "--ignore-root-user" + ] + ++ (lib.optionals (cfg.avoid != [ ]) [ + "--avoid" + "(^|/)(${lib.concatStringsSep "|" cfg.avoid})$" + ]) + ++ (lib.optionals (cfg.prefer != [ ]) [ + "--prefer" + "(^|/)(${lib.concatStringsSep "|" cfg.prefer})$" + ]); }; };