From e3f1eedbfccf5c22885592751e47e0ab9017af1b Mon Sep 17 00:00:00 2001 From: tomoron Date: Wed, 26 Feb 2025 16:52:55 +0100 Subject: [PATCH] disbale hypridle autosuspend on desktop --- homeConfigs/hosts/desktop.nix | 2 ++ homeConfigs/modules/wayland/hypridle.nix | 11 ++++++++--- homeConfigs/packages.nix | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/homeConfigs/hosts/desktop.nix b/homeConfigs/hosts/desktop.nix index 68062d0..77c4345 100644 --- a/homeConfigs/hosts/desktop.nix +++ b/homeConfigs/hosts/desktop.nix @@ -22,4 +22,6 @@ ]; cursor.no_hardware_cursors = 1; }; + + mods.hyprland.autoSuspend = false; } diff --git a/homeConfigs/modules/wayland/hypridle.nix b/homeConfigs/modules/wayland/hypridle.nix index 4c51d21..f24de7a 100644 --- a/homeConfigs/modules/wayland/hypridle.nix +++ b/homeConfigs/modules/wayland/hypridle.nix @@ -1,6 +1,12 @@ { lib, config, ... }: { + options.mods.hyprland.autoSuspend = lib.mkOption { + type = lib.types.bool; + default = true; + description = "enable hypridle suspend after 10min"; + }; + config = lib.mkIf config.mods.hyprland.enable { services.hypridle = { enable = true; @@ -17,11 +23,10 @@ timeout = 150; on-timeout = "loginctl lock-session"; } - { + ] ++ lib.lists.optional config.mods.hyprland.autoSuspend [{ timeout = 600; on-timeout = "systemctl suspend"; - } - ]; + }]; }; }; }; diff --git a/homeConfigs/packages.nix b/homeConfigs/packages.nix index 621ae45..231f0f3 100644 --- a/homeConfigs/packages.nix +++ b/homeConfigs/packages.nix @@ -6,7 +6,7 @@ # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/02/09 22:01:56 by tomoron #+# #+# # -# Updated: 2025/02/26 16:47:27 by tomoron ### ########.fr # +# Updated: 2025/02/26 16:52:52 by tomoron ### ########.fr # # # # **************************************************************************** #