Skip to content

Commit 3fcfcb8

Browse files
committed
nixos/display-managers: always run systemctl of the currently running systemd
1 parent a3678ed commit 3fcfcb8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

nixos/modules/services/x11/display-managers/default.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ let
3939
4040
${optionalString cfg.startDbusSession ''
4141
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
42-
${config.systemd.package}/bin/systemctl --user start dbus.socket
43-
export `${config.systemd.package}/bin/systemctl --user show-environment | grep '^DBUS_SESSION_BUS_ADDRESS'`
42+
/run/current-system/systemd/bin/systemctl --user start dbus.socket
43+
export `/run/current-system/systemd/bin/systemctl --user show-environment | grep '^DBUS_SESSION_BUS_ADDRESS'`
4444
fi
4545
''}
4646
@@ -60,7 +60,7 @@ let
6060
#
6161
# Also tell systemd about the dbus session bus address.
6262
# This is required by user units using the session bus.
63-
${config.systemd.package}/bin/systemctl --user import-environment DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
63+
/run/current-system/systemd/bin/systemctl --user import-environment DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS
6464
6565
# Load X defaults. This should probably be safe on wayland too.
6666
${xorg.xrdb}/bin/xrdb -merge ${xresourcesXft}
@@ -89,7 +89,7 @@ let
8989
fi
9090
9191
# Start systemd user services for graphical sessions
92-
${config.systemd.package}/bin/systemctl --user start graphical-session.target
92+
/run/current-system/systemd/bin/systemctl --user start graphical-session.target
9393
9494
# Allow the user to setup a custom session type.
9595
if test -x ~/.xsession; then
@@ -394,7 +394,7 @@ in
394394
395395
test -n "$waitPID" && wait "$waitPID"
396396
397-
${config.systemd.package}/bin/systemctl --user stop graphical-session.target
397+
/run/current-system/systemd/bin/systemctl --user stop graphical-session.target
398398
399399
exit 0
400400
'';

0 commit comments

Comments
 (0)