From 41165fcc3a79eb17c269dcbc3d30cfddba6c7782 Mon Sep 17 00:00:00 2001 From: Amadej Kastelic Date: Thu, 28 Nov 2024 17:46:55 +0100 Subject: [PATCH] Fix hypridle --- home/services/wayland/hypridle.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/home/services/wayland/hypridle.nix b/home/services/wayland/hypridle.nix index f49f5b2..707bfd5 100644 --- a/home/services/wayland/hypridle.nix +++ b/home/services/wayland/hypridle.nix @@ -1,18 +1,22 @@ { lib, config, + inputs, + pkgs, ... }: { services.hypridle = { enable = true; + package = inputs.hypridle.packages.${pkgs.system}.hypridle; + settings = { - lockCmd = "pidof hyprlock || ${lib.getExe config.programs.hyprlock.package}"; + general = { + lock_cmd = lib.getExe config.programs.hyprlock.package; + before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session"; + }; + listener = [ - { - timeout = 300; - onTimeout = "pidof hyprlock || ${lib.getExe config.programs.hyprlock.package}"; - } { timeout = 500; onTimeout = "hyprctl dispatch dpms off";