From b72c4a215003012038a14f387a3ba5284c118a82 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 24 Nov 2024 12:46:20 -0800 Subject: [PATCH] feat(home): i3lock -> betterlockscreen --- modules/home/services/screen-locker/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/home/services/screen-locker/default.nix b/modules/home/services/screen-locker/default.nix index 9d1e4a6..1146a19 100644 --- a/modules/home/services/screen-locker/default.nix +++ b/modules/home/services/screen-locker/default.nix @@ -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"; }; }; }