Merge pull request #303990 from acid-bong/patch-2

nixos/slock: add .package option (for those wishing to override it)
This commit is contained in:
tomberek 2024-04-15 09:20:15 -04:00 committed by GitHub
commit 2436aaf8fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -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;
};
};
}