about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorAcid Bong2024-04-14 12:00:42 +0300
committerAcid Bong2024-04-14 19:39:14 +0300
commita5cedfaffa62205ffeeb7d11a3d6d9ca483c2c65 (patch)
tree2a93b972fba3f75400f7377626f2c43e8f80aa74 /nixos/modules
parent5d67f4277d84c14d2e098dfa524c37291ded8138 (diff)
nixos/slock: add .package option (for those wishing to override)
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/programs/slock.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/programs/slock.nix b/nixos/modules/programs/slock.nix
index ce80fcc5d4a8..f39b4d5e9280 100644
--- a/nixos/modules/programs/slock.nix
+++ b/nixos/modules/programs/slock.nix
@@ -16,16 +16,17 @@ in
           Whether to install slock screen locker with setuid wrapper.
         '';
       };
+      package = mkPackageOption pkgs "slock" {};
     };
   };
 
   config = mkIf cfg.enable {
-    environment.systemPackages = [ pkgs.slock ];
+    environment.systemPackages = [ cfg.package ];
     security.wrappers.slock =
       { setuid = true;
         owner = "root";
         group = "root";
-        source = "${pkgs.slock.out}/bin/slock";
+        source = lib.getExe cfg.package;
       };
   };
 }