From 4da31089e74671ce213a5fe97068425306de1f23 Mon Sep 17 00:00:00 2001 From: Updater Date: Sat, 25 May 2024 21:17:31 -0400 Subject: [PATCH] fix(hypr): make sure hypridle runs --- modules/hyprland/security.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/hyprland/security.nix b/modules/hyprland/security.nix index 59a7902..dd5e89a 100644 --- a/modules/hyprland/security.nix +++ b/modules/hyprland/security.nix @@ -5,7 +5,7 @@ pkgs, ... }: let - inherit (lib) mkIf; + inherit (lib) mkIf optionals; inherit (config.vars) mainUser; isLaptop = config.services.logind.lidSwitch == "lock"; @@ -36,15 +36,20 @@ in { services.hypridle = mkIf isLaptop { enable = true; + package = hypridle.packages.${pkgs.system}.default; settings.general.lock_cmd = "${lockPkg}/bin/lock"; }; wayland.windowManager.hyprland = { settings = { - exec-once = [ - "gnome-keyring-daemon --start --components=secrets" - "${pkgs.plasma5Packages.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" - ]; + exec-once = + [ + "gnome-keyring-daemon --start --components=secrets" + "${pkgs.plasma5Packages.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" + ] + ++ optionals isLaptop [ + "systemctl --user restart hypridle" + ]; windowrule = [ "float,^(org.kde.polkit-kde-authentication-agent-1)$"