nixos/display-managers: Use dbus socket unit shipped by upstream

This ensures a correct DBUS_SESSION_BUS_ADDRESS environment variable
is set and imported into the systemd user environment.

Previously this would refer to a non-existing path preventing commands
interacting with the systemd manager from working.

Closes #87502
This commit is contained in:
adisbladis 2020-05-19 00:26:45 +01:00
parent 0f5ce2fac0
commit effceb8bfe
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7

View file

@ -39,7 +39,7 @@ let
${optionalString cfg.startDbusSession ''
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
exec ${pkgs.dbus.dbus-launch} --exit-with-session "$0" "$@"
${config.systemd.package}/bin/systemctl --user start dbus.socket
fi
''}