diff --git a/home-manager/sway/autostart.nix b/home-manager/sway/autostart.nix index 08ab834..1c727c3 100644 --- a/home-manager/sway/autostart.nix +++ b/home-manager/sway/autostart.nix @@ -6,9 +6,6 @@ bars = [{command = "waybar";}]; startup = [ - # Lock the screen on start, to allow an autostarted session - {command = "swaylock";} - # Scratchpads {command = "foot -a gotop -T Gotop gotop";} {command = "foot -a music -T Music ncmpcpp";} diff --git a/home-manager/sway/swaylock.nix b/home-manager/sway/swaylock.nix index c1cf348..91eefa5 100644 --- a/home-manager/sway/swaylock.nix +++ b/home-manager/sway/swaylock.nix @@ -58,4 +58,9 @@ in { home.packages = with pkgs; [ swayLock ]; + + # Enable Sway lock on startup + wayland.windowManager.sway.config.startup = [ + {command = "swaylock";} + ]; }