hyprland/noctalia: Use hypridle for idle management

This commit is contained in:
SebastianStork 2026-03-09 18:52:25 +01:00
parent ed5b3adf2d
commit 0b09699cc5
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
4 changed files with 26 additions and 8 deletions

View file

@ -4,17 +4,26 @@
lib,
...
}:
let
cfg = config.custom.services.hypridle;
in
{
options.custom.services.hypridle.enable = lib.mkEnableOption "";
options.custom.services.hypridle = {
enable = lib.mkEnableOption "";
lockCommand = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "";
};
};
config = lib.mkIf config.custom.services.hypridle.enable {
config = lib.mkIf cfg.enable {
services.hypridle = {
enable = true;
package = pkgs-unstable.hypridle;
settings = {
general = {
lock_cmd = lib.mkIf config.custom.programs.hyprlock.enable "pidof hyprlock || hyprlock";
lock_cmd = cfg.lockCommand;
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
};