️ (home/wayland) use the right hyprland package (from the flake) inside swayidle config

This commit is contained in:
Laureηt 2024-03-31 16:19:35 +02:00
parent 27cbe6a8d7
commit 139fa1c89b
Signed by: Laurent
SSH key fingerprint: SHA256:pb5NrYg80So5z9hmqQFPmp//sgr+DFeJkKhmGyU2NLk

View file

@ -1,11 +1,17 @@
{pkgs, ...}: { {
inputs,
pkgs,
...
}: let
hyprland_pkg = inputs.hyprland.packages."${pkgs.system}".hyprland;
in {
services.swayidle = { services.swayidle = {
enable = true; enable = true;
systemdTarget = "hyprland-session.target"; systemdTarget = "hyprland-session.target";
events = [ events = [
{ {
event = "after-resume"; event = "after-resume";
command = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; command = "${hyprland_pkg}/bin/hyprctl dispatch dpms on";
} }
{ {
event = "before-sleep"; event = "before-sleep";
@ -19,7 +25,7 @@
} }
{ {
timeout = 150; timeout = 150;
command = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off"; command = "${hyprland_pkg}/bin/hyprctl dispatch dpms off";
} }
{ {
timeout = 300; timeout = 300;