From 7b1af9703c747c2d73a859b0a481a2a574c638be Mon Sep 17 00:00:00 2001 From: Joinemm Date: Thu, 7 Mar 2024 10:55:21 +0200 Subject: [PATCH] Change screen locker to physlock --- modules/laptop.nix | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/modules/laptop.nix b/modules/laptop.nix index e94dfe2..b7ac1c3 100644 --- a/modules/laptop.nix +++ b/modules/laptop.nix @@ -41,18 +41,17 @@ ]; }; - systemd.user.services.xss-lock = { - unitConfig = { - Description = "Screenlocker service"; - PartOf = ["graphical-session.target"]; - }; - wantedBy = ["graphical-session.target"]; - serviceConfig = { - Environment = [ - "XSECURELOCK_PASSWORD_PROMPT=asterisks" - "XSECURELOCK_SHOW_KEYBOARD_LAYOUT=0" - ]; - ExecStart = "${pkgs.xss-lock}/bin/xss-lock --session \${XDG_SESSION_ID} -- ${pkgs.xsecurelock}/bin/xsecurelock"; - }; + services.physlock = { + enable = true; + allowAnyUser = true; + }; + services.xserver.xautolock = let + cmd = "/run/wrappers/physlock -d"; + in { + enable = true; + locker = cmd; + nowlocker = cmd; + time = 5; + killtime = 15; }; }