diff --git a/home/programs/graphical/wms/hyprland/config/exec.nix b/home/programs/graphical/wms/hyprland/config/exec.nix index b2e7126..72a61a8 100644 --- a/home/programs/graphical/wms/hyprland/config/exec.nix +++ b/home/programs/graphical/wms/hyprland/config/exec.nix @@ -1,8 +1,8 @@ {pkgs, ...}: { wayland.windowManager.hyprland.settings = { exec-once = [ - "${pkgs.systemd}/bin/systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP GTK_THEME QT_QPA_PLATFORMTHEME QT_STYLE_OVERRIDE" - "${pkgs.systemd}/bin/dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP GTK_THEME QT_QPA_PLATFORMTHEME QT_STYLE_OVERRIDE" + "${pkgs.systemd}/bin/systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" + "${pkgs.systemd}/bin/dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP" ]; }; } diff --git a/system/roles/workstation/display/login/greetd.nix b/system/roles/workstation/display/login/greetd.nix index 21690d5..c366e87 100644 --- a/system/roles/workstation/display/login/greetd.nix +++ b/system/roles/workstation/display/login/greetd.nix @@ -15,20 +15,10 @@ tuiGreetTheme = "'border=magenta;text=cyan;prompt=green;time=red;action=white;button=yellow;container=black;input=gray'"; sessionData = config.services.displayManager.sessionData.desktops; - - # Run the session / application using the appropriate shell configured for this user. - # This will make sure all of the environment variables are set before the WM session - # is started. This is very important, as without it, variables for things like qt theme - # will not be set, and applications executed by the WM will not be themed properly. - sessionWrapperScript = pkgs.writeShellScriptBin "tuigreet-session-wrapper" '' - set -euo pipefail - - script_name="$0" - shell="$(getent passwd itsdrike | awk -F: '{print $NF}')" - command=("$@") - - exec "$shell" -c 'exec "$@"' "$script_name" "''${command[@]}" - ''; + sessionPaths = concatStringsSep ":" [ + "${sessionData}/share/xsessions" + "${sessionData}/share/wayland-sessions" + ]; defaultSession = { user = "greeter"; @@ -39,11 +29,8 @@ "--remember-user-session" "--asterisks" "--greeting ${greetingMsg}" + "--sessions '${sessionPaths}'" "--theme ${tuiGreetTheme}" - "--sessions '${sessionData}/share/wayland-sessions'" - "--xsessions '${sessionData}/share/xsessions'" - "--session-wrapper ${sessionWrapperScript}/bin/tuigreet-session-wrapper" - "--xsession-wrapper ${sessionWrapperScript}/bin/tuigreet-session-wrapper startx /usr/bin/env \"$@\"" ]; }; in { @@ -65,7 +52,7 @@ in { # See: https://github.com/apognu/tuigreet/issues/68#issuecomment-1586359960 systemd.services.greetd.serviceConfig = { Type = "idle"; - StandardInput = "tty"; + StandardInputs = "tty"; StandardOutput = "tty"; StandardError = "journal"; TTYReset = true;