E.g. wayland.conf containing: 1 2 3 4 # Wayland configuration GDK_BACKEND = wayland XDG_SESSION_TYPE = wayland SDL_VIDEO_DRIVER = wayland Instead of directly launching sway from your display manager or shell config, create a wrapper script swayrun.sh , based on this comment. 1 2 3 4 5 6 7 8 9 10 11 12 #!/usr/bin/env bash set -euo pipefail # Export all variables set -a # Call the systemd generator that reads all files in environment.d source /dev/fd/0 <<EOF $(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator) EOF set +a exec sway In your display manager or shell config, replace exec sway by exec ~/path/to/swayrun.sh . All your environment variables set in the environment.d directory will now be shared between your shell, Sway and systemd services.