diff options
| author | 2026-05-22 10:41:23 +0100 | |
|---|---|---|
| committer | 2026-05-22 10:41:23 +0100 | |
| commit | 844ef0c37a6f10a1c912707c35dd843c44ea92ba (patch) | |
| tree | 93533897d8b7a307cfefb0f89a2b45ccca6c9d24 /dot_config/sway | |
| parent | 159d69ddd122cfdb55d087d754d7472d42fa73ae (diff) | |
| download | dotfiles-844ef0c37a6f10a1c912707c35dd843c44ea92ba.tar.gz dotfiles-844ef0c37a6f10a1c912707c35dd843c44ea92ba.tar.bz2 dotfiles-844ef0c37a6f10a1c912707c35dd843c44ea92ba.zip | |
fix(sway): propagate PATH / GPG env into systemd --user + dbus
Waybar (and other user services) was inheriting the bare pre-login
PATH from systemd --user, missing ~/.nix-profile/bin and ~/.local/bin.
Modules that call nix-provisioned binaries (pass, python3, ncat from
common.nix) silently picked up system copies instead — symptom was
waybar showing different output from the same script when invoked
manually (thunderbird tb-unread.sh, wifi-status.sh).
Also propagate GNUPGHOME and GPG_TTY so pinentry / pass-otp inside
user services behave the same as in the interactive shell.
Diffstat (limited to 'dot_config/sway')
| -rw-r--r-- | dot_config/sway/config | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/dot_config/sway/config b/dot_config/sway/config index 688f0d2..4ad670d 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -250,8 +250,17 @@ bindsym $mod+t exec ~/.config/sway/tb-toggle.sh # Managed by waybar.service (pulled in via sway-session.target). # ── Autostart ───────────────────────────────────────────────────────────────── -exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP PASSWORD_STORE_DIR -exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP PASSWORD_STORE_DIR +# Propagate the login-shell env (zprofile already ran by the time sway +# executes its config) into the systemd --user manager AND the DBus +# activation environment. Without this, user services like waybar.service +# inherit the bare pre-login PATH (no ~/.nix-profile/bin, no ~/.local/bin), +# and modules invoking nix-provisioned binaries (pass / python3 / ncat +# from common.nix) silently pick up the system copies instead — manifests +# as waybar modules printing different output from the same script run +# interactively. PATH is the critical one; GNUPGHOME / GPG_TTY keep +# pass-otp + pinentry consistent with the interactive shell. +exec systemctl --user import-environment PATH DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP PASSWORD_STORE_DIR GNUPGHOME GPG_TTY +exec dbus-update-activation-environment --systemd PATH DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP PASSWORD_STORE_DIR GNUPGHOME GPG_TTY exec "sleep 2 && ~/.config/sway/display-toggle.sh apply" exec systemctl --user start sway-session.target exec ~/.config/sway/tb-autostart.sh |
