disbale hypridle autosuspend on desktop

This commit is contained in:
2025-02-26 16:52:55 +01:00
parent c594bfe3a4
commit e3f1eedbfc
3 changed files with 11 additions and 4 deletions

View File

@ -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";
}
];
}];
};
};
};