home: fix swayidle not working properly

fixes https://github.com/Guanran928/flake/issues/1
This commit is contained in:
Guanran Wang 2023-12-07 14:26:40 +08:00
parent 89c14dbd7c
commit 3aede98bd9
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
2 changed files with 9 additions and 4 deletions

View file

@ -1,4 +1,8 @@
{pkgs, ...}: {
{
pkgs,
lib,
...
}: {
imports = [
../swaylock
];
@ -9,7 +13,7 @@
timeouts = [
{
timeout = 900;
command = "swaylock";
command = lib.getExe pkgs.swaylock-effects;
} # lock screen
{
timeout = 905;
@ -24,11 +28,11 @@
events = [
{
event = "lock";
command = "swaylock";
command = lib.getExe pkgs.swaylock-effects;
} # loginctl lock-session
{
event = "before-sleep";
command = "swaylock";
command = lib.getExe pkgs.swaylock-effects;
} # systemctl syspend
];
};

View file

@ -3,6 +3,7 @@
enable = true;
package = pkgs.swaylock-effects;
settings = {
daemonize = true;
screenshots = true;
clock = true;
indicator = true;