From 6ddc91780f2a92ff0268e89e807455169bf2f2a3 Mon Sep 17 00:00:00 2001 From: alejandro-angulo Date: Mon, 1 Sep 2025 12:49:40 -0700 Subject: [PATCH] Disaple suspend on gospel --- homes/x86_64-linux/alejandro@gospel/default.nix | 1 + modules/home/services/hypridle/default.nix | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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"; - } + }) ]; }; };