From 146d9eac0f604d3efc3714bcb82a77e02409894b Mon Sep 17 00:00:00 2001 From: coolneng Date: Sun, 12 Feb 2023 23:59:44 +0100 Subject: [PATCH] Revert "Replace LightDM with greetd" This reverts commit d36734ecfc4a29016676e6956dc48ff8bac7a28b. --- modules/gui.nix | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/modules/gui.nix b/modules/gui.nix index 7dbbb28..a12706e 100644 --- a/modules/gui.nix +++ b/modules/gui.nix @@ -2,31 +2,18 @@ with pkgs; -let - swayRun = writeShellScript "sway-startup-script" '' - export MOZ_ENABLE_WAYLAND=1 - export MOZ_USE_XINPUT2=1 - export GRIM_DEFAULT_DIR=/home/coolneng/Photos/Screenshots - export _JAVA_AWT_WM_NONREPARENTING=1 - export XDG_SESSION_TYPE=wayland - export XDG_CURRENT_DESKTOP=sway - export NVIM_LISTEN_ADDRESS=/tmp/nvimsocket - export GIT_CONFIG_NOSYSTEM=true - export SYSTEMD_LESS=FRSMK - - exec sway $@ - ''; - -in { +{ # Display manager - services.greetd = { - enable = true; - settings = rec { - initial_session = { - command = swayRun; - user = "coolneng"; - }; - default_session = initial_session; + services.xserver.enable = true; + services.xserver.displayManager = { + defaultSession = "sway"; + autoLogin = { + enable = true; + user = "coolneng"; + }; + lightdm = { + enable = true; + greeter.enable = false; }; }; @@ -48,8 +35,20 @@ in { kanshi kitty qt5.qtwayland - xdg-utils + glib ]; + extraSessionCommands = '' + export MOZ_ENABLE_WAYLAND=1 + export MOZ_USE_XINPUT2=1 + export GRIM_DEFAULT_DIR=/home/coolneng/Photos/Screenshots + export _JAVA_AWT_WM_NONREPARENTING=1 + export SDL_VIDEODRIVER=wayland + export XDG_SESSION_TYPE=wayland + export XDG_CURRENT_DESKTOP=sway + export NVIM_LISTEN_ADDRESS=/tmp/nvimsocket + export GIT_CONFIG_NOSYSTEM=true + export SYSTEMD_LESS=FRSMK + ''; wrapperFeatures.gtk = true; };