nix-config/home/desktop/hyprland/swayidle.nix
2024-08-16 01:28:58 +02:00

20 lines
438 B
Nix

{ config, ... }: let
swaylock = "${config.programs.swaylock.package}/bin/swaylock";
in {
services.swayidle = {
enable = true;
systemdTarget = "graphical-session.target";
events = [
{
event = "before-sleep";
command = "${swaylock} --daemonize";
}
];
# timeouts = [
# {
# timeout = 4 * 60;
# command = "${swaylock} --daemonize --grace 15";
# }
# ];
};
}