{
lib,
config,
...
}: {
services.swayidle = {
enable = true;
events = [
event = "lock";
command = "${lib.getExe config.programs.swaylock.package} --daemonize";
}
event = "before-sleep";
];
};
systemd.user.services.swayidle.Unit.After = lib.mkForce ["graphical-session.target"];