nixos/display-managers: always run systemctl of the currently running systemd
This commit is contained in:
parent
a3678ed347
commit
3fcfcb8bcb
@ -39,8 +39,8 @@ let
|
|||||||
|
|
||||||
${optionalString cfg.startDbusSession ''
|
${optionalString cfg.startDbusSession ''
|
||||||
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
|
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
|
||||||
${config.systemd.package}/bin/systemctl --user start dbus.socket
|
/run/current-system/systemd/bin/systemctl --user start dbus.socket
|
||||||
export `${config.systemd.package}/bin/systemctl --user show-environment | grep '^DBUS_SESSION_BUS_ADDRESS'`
|
export `/run/current-system/systemd/bin/systemctl --user show-environment | grep '^DBUS_SESSION_BUS_ADDRESS'`
|
||||||
fi
|
fi
|
||||||
''}
|
''}
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ let
|
|||||||
#
|
#
|
||||||
# Also tell systemd about the dbus session bus address.
|
# Also tell systemd about the dbus session bus address.
|
||||||
# This is required by user units using the session bus.
|
# 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.
|
# Load X defaults. This should probably be safe on wayland too.
|
||||||
${xorg.xrdb}/bin/xrdb -merge ${xresourcesXft}
|
${xorg.xrdb}/bin/xrdb -merge ${xresourcesXft}
|
||||||
@ -89,7 +89,7 @@ let
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Start systemd user services for graphical sessions
|
# 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.
|
# Allow the user to setup a custom session type.
|
||||||
if test -x ~/.xsession; then
|
if test -x ~/.xsession; then
|
||||||
@ -394,7 +394,7 @@ in
|
|||||||
|
|
||||||
test -n "$waitPID" && wait "$waitPID"
|
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
|
exit 0
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user