2024-09-20 17:38:01 +00:00
|
|
|
{ lib, config, ... }:
|
2024-08-25 15:02:35 +00:00
|
|
|
{
|
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
|
|
|
}
|