nixos/slock: add .package option (for those wishing to override)

This commit is contained in:
Acid Bong 2024-04-14 12:00:42 +03:00
parent 5d67f4277d
commit a5cedfaffa
No known key found for this signature in database

View file

@ -16,16 +16,17 @@ in
Whether to install slock screen locker with setuid wrapper. Whether to install slock screen locker with setuid wrapper.
''; '';
}; };
package = mkPackageOption pkgs "slock" {};
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.slock ]; environment.systemPackages = [ cfg.package ];
security.wrappers.slock = security.wrappers.slock =
{ setuid = true; { setuid = true;
owner = "root"; owner = "root";
group = "root"; group = "root";
source = "${pkgs.slock.out}/bin/slock"; source = lib.getExe cfg.package;
}; };
}; };
} }