summary refs log tree commit diff
path: root/nixos/modules/services/x11/display-managers/default.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-05-21 10:32:59 +0200
committerFlorian Klink <flokli@flokli.de>2020-05-21 10:32:59 +0200
commit3fcfcb8bcb5f390da45d12702bb1a7afb07287f3 (patch)
treee62afccce69b4c6b24d07bfe5b5888d406d4e85c /nixos/modules/services/x11/display-managers/default.nix
parenta3678ed34711eccfa1ef27f22b51217b1e6c2821 (diff)
downloadnixpkgs-3fcfcb8bcb5f390da45d12702bb1a7afb07287f3.tar
nixpkgs-3fcfcb8bcb5f390da45d12702bb1a7afb07287f3.tar.gz
nixpkgs-3fcfcb8bcb5f390da45d12702bb1a7afb07287f3.tar.bz2
nixpkgs-3fcfcb8bcb5f390da45d12702bb1a7afb07287f3.tar.lz
nixpkgs-3fcfcb8bcb5f390da45d12702bb1a7afb07287f3.tar.xz
nixpkgs-3fcfcb8bcb5f390da45d12702bb1a7afb07287f3.tar.zst
nixpkgs-3fcfcb8bcb5f390da45d12702bb1a7afb07287f3.zip
nixos/display-managers: always run systemctl of the currently running systemd
Diffstat (limited to 'nixos/modules/services/x11/display-managers/default.nix')
-rw-r--r--nixos/modules/services/x11/display-managers/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix
index a69e4743173..aa6a5ec42be 100644
--- a/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -39,8 +39,8 @@ let
 
       ${optionalString cfg.startDbusSession ''
         if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
-          ${config.systemd.package}/bin/systemctl --user start dbus.socket
-          export `${config.systemd.package}/bin/systemctl --user show-environment | grep '^DBUS_SESSION_BUS_ADDRESS'`
+          /run/current-system/systemd/bin/systemctl --user start dbus.socket
+          export `/run/current-system/systemd/bin/systemctl --user show-environment | grep '^DBUS_SESSION_BUS_ADDRESS'`
         fi
       ''}
 
@@ -60,7 +60,7 @@ let
       #
       # 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
+      /run/current-system/systemd/bin/systemctl --user import-environment DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
 
       # Load X defaults. This should probably be safe on wayland too.
       ${xorg.xrdb}/bin/xrdb -merge ${xresourcesXft}
@@ -89,7 +89,7 @@ let
       fi
 
       # Start systemd user services for graphical sessions
-      ${config.systemd.package}/bin/systemctl --user start graphical-session.target
+      /run/current-system/systemd/bin/systemctl --user start graphical-session.target
 
       # Allow the user to setup a custom session type.
       if test -x ~/.xsession; then
@@ -394,7 +394,7 @@ in
 
           test -n "$waitPID" && wait "$waitPID"
 
-          ${config.systemd.package}/bin/systemctl --user stop graphical-session.target
+          /run/current-system/systemd/bin/systemctl --user stop graphical-session.target
 
           exit 0
         '';