From d13b2879b4466e040bee13396b279f6026a13923 Mon Sep 17 00:00:00 2001 From: alexion Date: Sun, 11 Oct 2026 17:23:32 -0400 Subject: [PATCH] refactor(hyprlock): inline command paths --- .../modules/desktop/session/hyprland/hyprlock.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/configs/nixos/modules/desktop/session/hyprland/hyprlock.nix b/configs/nixos/modules/desktop/session/hyprland/hyprlock.nix index c2e389a..a37098f 100644 --- a/configs/nixos/modules/desktop/session/hyprland/hyprlock.nix +++ b/configs/nixos/modules/desktop/session/hyprland/hyprlock.nix @@ -6,11 +6,6 @@ }: # The lock screen: a hyprlock session-lock surface the compositor owns. let - user = config.user.name; - - # The hyprlock this module installs, used by the lock keybind below. - hyprlock = "${config.home-manager.users.${user}.programs.hyprlock.package}/bin/hyprlock"; - sleepIcon = builtins.fromJSON ''"\udb81\udcb2"''; sleepOffIcon = builtins.fromJSON ''"\udb81\udcb3"''; @@ -53,7 +48,9 @@ in keys = "SUPER + X"; action = { kind = "exec"; - command = "${pkgs.procps}/bin/pidof hyprlock || ${hyprlock}"; + # The guard drops the call when a locker is already up, so no manual + # trigger stacks a second hyprlock over the first. + command = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; }; }; @@ -66,7 +63,7 @@ in }; }; - home-manager.users.${user} = { + home-manager.users.${config.user.name} = { # Colors and the lock-screen background come from Stylix's hyprlock target, # so only geometry and behaviour are set here. programs.hyprlock = { @@ -99,7 +96,6 @@ in }; }; }; - }; }; }