diff --git a/homes/x86_64-linux/alejandro@gospel/default.nix b/homes/x86_64-linux/alejandro@gospel/default.nix index a10dea8..0814b5b 100644 --- a/homes/x86_64-linux/alejandro@gospel/default.nix +++ b/homes/x86_64-linux/alejandro@gospel/default.nix @@ -11,4 +11,5 @@ monitor = [ "HDMI-A-1,preferred,auto,1.25" ]; }; aa.windowManagers.sway.enable = lib.mkForce false; + aa.services.hypridle.suspendEnable = false; } diff --git a/modules/home/services/hypridle/default.nix b/modules/home/services/hypridle/default.nix index d0aa75f..50e792d 100644 --- a/modules/home/services/hypridle/default.nix +++ b/modules/home/services/hypridle/default.nix @@ -42,6 +42,13 @@ in Timeout in seconds before suspending the system ''; }; + suspendEnable = mkOption { + type = types.bool; + default = true; + description = '' + Whether or not to automatically suspend + ''; + }; brightnessTimeout = mkOption { type = types.int; @@ -99,10 +106,10 @@ in on-resume = "hyprctl dispatch dpms on && ${pkgs.brightnessctl}/bin/brightnessctl -r"; } # Suspend system - { + (lib.mkIf cfg.suspendEnable { timeout = cfg.suspendTimeout; on-timeout = "systemctl suspend"; - } + }) ]; }; };