snowflake/home/wayland/services/hypridle.nix
2024-05-26 16:48:37 -04:00

27 lines
567 B
Nix

{
pkgs,
lib,
config,
...
}: {
services.hypridle = {
enable = true;
settings = {
general = {
ignore_dbus_inhibit = false;
lock_cmd = lib.getExe config.programs.hyprlock.package;
before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session";
};
listener = [
{
timeout = 400;
on-timeout = "${lib.getExe config.programs.hyprlock.package}";
}
{
timeout = 460;
on-timeout = "${pkgs.systemd}/bin/systemctl suspend";
}
];
};
};
}