snowflake/home/wayland/services/hypridle.nix

28 lines
625 B
Nix
Raw Normal View History

2024-03-07 03:54:42 -05:00
{
2024-05-13 11:13:29 -04:00
inputs,
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
...
}: {
2024-05-13 11:13:29 -04:00
imports = [inputs.hypridle.homeManagerModules.default];
disabledModules = ["${inputs.home-manager}/modules/services/hypridle.nix"];
2024-03-07 03:54:42 -05:00
services.hypridle = {
enable = true;
2024-05-13 11:13:29 -04:00
ignoreDbusInhibit = false;
lockCmd = lib.getExe config.programs.hyprlock.package;
beforeSleepCmd = "${pkgs.systemd}/bin/loginctl lock-session";
listeners = [
{
timeout = 400;
onTimeout = "${lib.getExe config.programs.hyprlock.package}";
}
{
timeout = 460;
onTimeout = "${pkgs.systemd}/bin/systemctl suspend";
}
];
2024-03-07 03:54:42 -05:00
};
}