set up swaylock and swayidle

This commit is contained in:
insects 2024-08-14 11:41:10 +02:00
parent 0537951879
commit 6de5076d42
6 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,20 @@
{ 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";
}
];
};
}