big module system implementation

This commit is contained in:
cnst
2024-08-17 18:28:42 +02:00
parent 505afa84d0
commit 7525ab34c1
155 changed files with 2402 additions and 2029 deletions

View File

@@ -0,0 +1,36 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.modules.wm.utils.hypridle;
in {
options = {
modules.wm.utils.hypridle.enable = mkEnableOption "Enables hypridle";
};
config = mkIf cfg.enable {
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "hyprlock";
before_sleep_cmd = "$lock_cmd";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 900; # 15mins
on-timeout = "hyprlock";
}
{
timeout = 1200; # 20mins
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
};
}