From 200d49a0e1ee19b66f22347888b15ed63da60bcb Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 2 Sep 2024 01:11:20 +0300 Subject: feat(tazjin/home): configure screen locking with swayidle Change-Id: I73e42071710f481c0f1acf965e18446c18e7c94b Reviewed-on: https://cl.tvl.fyi/c/depot/+/12430 Autosubmit: tazjin Reviewed-by: tazjin Tested-by: BuildkiteCI --- users/tazjin/home/shared.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'users/tazjin/home/shared.nix') diff --git a/users/tazjin/home/shared.nix b/users/tazjin/home/shared.nix index 9d5fbb266078..c80a10945fa3 100644 --- a/users/tazjin/home/shared.nix +++ b/users/tazjin/home/shared.nix @@ -72,6 +72,14 @@ in }; }; + services.swayidle = let cmd = "${pkgs.swaylock}/bin/swaylock -fFkl -c 008080"; in { + enable = true; + events = [ + { event = "before-sleep"; command = cmd; } + { event = "lock"; command = cmd; } + ]; + }; + # Enable the dunst notification daemon, but force the # configuration file separately instead of going via the strange # Nix->dunstrc encoding route. -- cgit 1.4.1