diff --git a/home/hypr.nix b/home/hypr.nix index cc8f417..d4669c4 100644 --- a/home/hypr.nix +++ b/home/hypr.nix @@ -150,6 +150,30 @@ helvum ]; + services.hypridle = { + enable = true; + settings = { + general = { + lock_cmd = "pidof hyprlock || hyprlock"; + before_sleep_cmd = "loginctl lock-session"; + after_sleep_cmd = "hyprctl dispatch dpms on"; + ignore_dbus_inhibit = false; + }; + + listener = [ + { + timeout = 600; + on-timeout = "loginctl lock-session"; + } + { + timeout = 900; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; + services.hyprpolkitagent.enable = true; services.hyprsunset.enable = true;