summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authoradisbladis <adis@blad.is>2017-10-16 17:49:07 +0800
committeradisbladis <adis@blad.is>2017-10-17 10:06:05 +0800
commit40f402cf653db5c9a3c8a704b25f9437e40fc033 (patch)
tree8c2a5e077ba5a7776440d78c9e632828057db474 /nixos
parente55b99e840e713f840f4a6989211913707838708 (diff)
downloadnixpkgs-40f402cf653db5c9a3c8a704b25f9437e40fc033.tar
nixpkgs-40f402cf653db5c9a3c8a704b25f9437e40fc033.tar.gz
nixpkgs-40f402cf653db5c9a3c8a704b25f9437e40fc033.tar.bz2
nixpkgs-40f402cf653db5c9a3c8a704b25f9437e40fc033.tar.lz
nixpkgs-40f402cf653db5c9a3c8a704b25f9437e40fc033.tar.xz
nixpkgs-40f402cf653db5c9a3c8a704b25f9437e40fc033.tar.zst
nixpkgs-40f402cf653db5c9a3c8a704b25f9437e40fc033.zip
display-managers: Import DBUS session bus address & Xauthority in systemd user session
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/x11/display-managers/default.nix9
1 files 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 58773685ec1..3fa482fb672 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}