From 029f9c50068364750b4f735894f1c73e58e96c51 Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 13 Jan 2023 23:17:39 +0100 Subject: [PATCH] Replace LightDM with greetd --- modules/gui.nix | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/modules/gui.nix b/modules/gui.nix index d636bf4..fb003bd 100644 --- a/modules/gui.nix +++ b/modules/gui.nix @@ -2,18 +2,32 @@ 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 + export LIBVA_DRIVER_NAME=iHD + + exec sway $@ + ''; + +in { # Display manager - services.xserver.enable = true; - services.xserver.displayManager = { - defaultSession = "sway"; - autoLogin = { - enable = true; - user = "coolneng"; - }; - lightdm = { - enable = true; - greeter.enable = false; + services.greetd = { + enable = true; + settings = rec { + initial_session = { + command = swayRun; + user = "coolneng"; + }; + default_session = initial_session; }; }; @@ -37,19 +51,6 @@ with pkgs; qt5.qtwayland 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 - export LIBVA_DRIVER_NAME=iHD - ''; wrapperFeatures.gtk = true; };