From 40f402cf653db5c9a3c8a704b25f9437e40fc033 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Mon, 16 Oct 2017 17:49:07 +0800 Subject: [PATCH] display-managers: Import DBUS session bus address & Xauthority in systemd user session --- nixos/modules/services/x11/display-managers/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index 58773685ec1f..3fa482fb6722 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -92,9 +92,12 @@ let ${config.hardware.pulseaudio.package.out}/bin/pactl load-module module-x11-publish "display=$DISPLAY" ''} - # Tell systemd about our $DISPLAY. This is needed by the - # ssh-agent unit. - ${config.systemd.package}/bin/systemctl --user import-environment DISPLAY + # Tell systemd about our $DISPLAY and $XAUTHORITY. + # This is needed by the ssh-agent unit. + # + # Also tell systemd about the dbus session bus address. + # This is required by user units using the session bus. + ${config.systemd.package}/bin/systemctl --user import-environment DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS # Load X defaults. ${xorg.xrdb}/bin/xrdb -merge ${xresourcesXft}