Loading
sway: prefer systemd user bus over spawning a session dbus-daemon
The base wrapper falls back to `dbus-run-session sway` when `DBUS_SESSION_BUS_ADDRESS` is unset. `dbus-run-session` unconditionally spawns `dbus-daemon` (reference impl) as a fresh session bus, ignoring the per-user bus already provided by `systemd --user` at `$XDG_RUNTIME_DIR/bus`. On NixOS this matters in two ways: - Under `services.dbus.implementation = "broker"`, sway descendants bypass the broker user bus and land on a separate `dbus-daemon`, splitting the session between two buses. - Even under the reference impl, a redundant second `dbus-daemon` gets spawned for the sway session. Prefer the existing user bus at `$XDG_RUNTIME_DIR/bus` when available and keep `dbus-run-session` only as the last-resort fallback for environments without a `systemd --user` instance (containers, minimal CI).