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

View file

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