diff --git a/home-manager/sway/default.nix b/home-manager/sway/default.nix index d2c21e8..b69e2d8 100644 --- a/home-manager/sway/default.nix +++ b/home-manager/sway/default.nix @@ -38,6 +38,17 @@ in }; }; + services.swayidle = { + enable = true; + events = [ + { event = "before-sleep"; command = "${pkgs.swaylock-fancy}/bin/swaylock-fancy"; } + ]; + timeouts = [ + { timeout = 60; command = "swaymsg \"output * power off\""; resumeCommand = "swaymsg \"output * power on\""; } + { timeout = 90; command = "${pkgs.swaylock-fancy}/bin/swaylock-fancy"; } + ]; + }; + wayland.windowManager.sway = { enable = true;