From 139fa1c89baa527be0caea1b94bdb5a52cdae6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Sun, 31 Mar 2024 16:19:35 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20(home/wayland)=20use=20the?= =?UTF-8?q?=20right=20hyprland=20package=20(from=20the=20flake)=20inside?= =?UTF-8?q?=20swayidle=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/wayland/swayidle/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/home/wayland/swayidle/default.nix b/home/wayland/swayidle/default.nix index 5c2f919..ca8fa27 100644 --- a/home/wayland/swayidle/default.nix +++ b/home/wayland/swayidle/default.nix @@ -1,11 +1,17 @@ -{pkgs, ...}: { +{ + inputs, + pkgs, + ... +}: let + hyprland_pkg = inputs.hyprland.packages."${pkgs.system}".hyprland; +in { services.swayidle = { enable = true; systemdTarget = "hyprland-session.target"; events = [ { event = "after-resume"; - command = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; + command = "${hyprland_pkg}/bin/hyprctl dispatch dpms on"; } { event = "before-sleep"; @@ -19,7 +25,7 @@ } { timeout = 150; - command = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off"; + command = "${hyprland_pkg}/bin/hyprctl dispatch dpms off"; } { timeout = 300;