snowflake/home/wayland/services/hypridle.nix

28 lines
567 B
Nix
Raw Normal View History

2024-03-07 03:54:42 -05:00
{
pkgs,
lib,
2024-04-22 16:16:03 -04:00
config,
2024-03-07 03:54:42 -05:00
...
}: {
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";
}
];
};
2024-03-07 03:54:42 -05:00
};
}