From b64ac314153071fd70e1529f4f7f8a2f05c13ae8 Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Wed, 23 Sep 2026 03:47:14 +0500 Subject: [PATCH] auto start sway and lock screen --- config/sway/config | 3 +++ hosts/la2410/configuration.nix | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/config/sway/config b/config/sway/config index 31acc6d..a873cc8 100644 --- a/config/sway/config +++ b/config/sway/config @@ -115,6 +115,9 @@ mode "resize" { } bindsym $mod+r mode "resize" +# lock screen on sway startup +exec swaylock -e -c 000000 + exec { waybar kanshi diff --git a/hosts/la2410/configuration.nix b/hosts/la2410/configuration.nix index 40d7496..19a9a69 100644 --- a/hosts/la2410/configuration.nix +++ b/hosts/la2410/configuration.nix @@ -272,18 +272,18 @@ pulse.enable = true; }; -services.displayManager.ly = { +# auto login on boot up into sway, sway is configured to start sway lock, so the swaylock password is the login +services.greetd = { enable = true; settings = { -# auto_login_user = "shihaam"; -# auto_login_session = "sway"; -# auto_login_service = "ly-autologin"; - animation = "matrix"; - bigclock = "en"; - asterisk = null; - battery_id = "BAT0"; - brightness_up_cmd = "${pkgs.brightnessctl}/bin/brightnessctl -q -n s +10%"; - brightness_down_cmd = "${pkgs.brightnessctl}/bin/brightnessctl -q -n s 10%-"; + initial_session = { + command = "sway"; + user = "shihaam"; + }; + default_session = { + command = "${pkgs.tuigreet}/bin/tuigreet --time --asterisks --cmd sway"; + user = "greeter"; + }; }; }; #boot.kernelModules = [ "i2c-dev" ];