Compare commits

..

No commits in common. "59e99a54a7288fbfd729d39ddccf7e1e6e41b4d5" and "ddd49ed84f6f4cbe9b59a6c09eb46e7267cd3ae2" have entirely different histories.

2 changed files with 5 additions and 10 deletions

View file

@ -6,26 +6,23 @@
...
}:
let
inherit (lib) mkEnableOption mkIf getExe;
inherit (lib) mkEnableOption mkIf;
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 = "${getExe pkgs.betterlockscreen} -l";
lockCmd = if hasI3 then "${pkgs.i3lock}/bin/i3lock --nofork" else "";
};
};
}

View file

@ -14,10 +14,9 @@ let
listToAttrs
getExe
;
inherit (lib.marleyos) enabled disabled;
inherit (lib.marleyos) enabled;
cfg = config.marleyos.xorg.i3;
isGenericLinux = config.targets.genericLinux.enable;
in
{
options.marleyos.xorg.i3.enable = mkEnableOption "i3";
@ -29,8 +28,7 @@ in
dunst = enabled;
picom = enabled;
polybar = enabled;
# broken on non-nixOS
screen-locker = if isGenericLinux then enabled else disabled;
screen-locker = enabled;
};
};