feat(home): i3lock -> betterlockscreen
This commit is contained in:
parent
ddd49ed84f
commit
b72c4a2150
1 changed files with 6 additions and 3 deletions
|
@ -6,23 +6,26 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
inherit (lib) mkEnableOption mkIf getExe;
|
||||
|
||||
cfg = config.marleyos.services.screen-locker;
|
||||
hasXorg = config.xsession.enable;
|
||||
hasI3 = config.xsession.windowManager.i3.enable;
|
||||
in
|
||||
{
|
||||
options.marleyos.services.screen-locker.enable = mkEnableOption "screen-locker";
|
||||
|
||||
config = mkIf (cfg.enable && hasXorg) {
|
||||
home.packages = with pkgs; [
|
||||
betterlockscreen
|
||||
];
|
||||
|
||||
services.screen-locker = {
|
||||
enable = true;
|
||||
inactiveInterval = 20;
|
||||
|
||||
# exec xss-lock {xss-lock.extraOptions} -- {lockCmd}
|
||||
xss-lock.extraOptions = [ "--transfer-sleep-lock" ];
|
||||
lockCmd = if hasI3 then "${pkgs.i3lock}/bin/i3lock --nofork" else "";
|
||||
lockCmd = "${getExe pkgs.betterlockscreen} -l";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue