zaphyra's git: nixfiles

zaphyra and void's nixfiles

commit 7f89d6d2e906721759bed028298c2ab1f2940578
parent 7fa2370ddf90e14a507486487359f522efb514e2
Author: Katja (ctucx) <git@ctu.cx>
Date: Mon, 19 May 2025 13:27:18 +0200

config/modules/services: add `systemd-oomd`
1 file changed, 26 insertions(+), 0 deletions(-)
diff --git a/config/nixos/modules/services/systemd-oomd.nix b/config/nixos/modules/services/systemd-oomd.nix
@@ -0,0 +1,26 @@
+{
+  povSelf,
+  config,
+  lib,
+  ...
+}:
+let
+  inherit (lib) types;
+  cfg = lib.getAttrFromPath povSelf config;
+
+in
+{
+
+  options.enable = {
+    type = types.bool;
+    default = false;
+  };
+
+  config = lib.mkIf cfg.enable {
+    systemd.oomd = {
+      enable = true;
+      enableUserSlices = true;
+    };
+  };
+
+}