flake/home/applications/swayidle/default.nix

27 lines
461 B
Nix
Raw Normal View History

{
lib,
2023-12-07 06:49:38 +00:00
config,
...
}:
{
2024-08-30 01:07:53 +00:00
services.swayidle = {
enable = true;
timeouts = [
{
timeout = 60 * 10;
command = "/run/current-system/sw/bin/systemctl suspend";
}
];
events = [
{
event = "lock";
command = lib.getExe config.programs.swaylock.package;
}
{
event = "before-sleep";
command = "/run/current-system/systemd/bin/loginctl lock-session";
}
];
};
2023-11-05 12:50:08 +00:00
}