notifyActive activation script: fix

the DBUS_SESSION_BUS_ADDRESS env var referred to the XDG_RUNTIME_DIR, the latter wasn't set by the time the former was being evaluated
This commit is contained in:
2024-10-05 07:17:51 +00:00
parent ec11d681ee
commit 3e40fe73f8
2 changed files with 5 additions and 1 deletions

View File

@@ -1200,7 +1200,7 @@ in
. "$HOME/.profile"
fi
dbus_file="$XDG_RUNTIME_DIR/bus"
dbus_file="$XDG_RUNTIME_DIR/dbus/bus"
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && [ -e "$dbus_file" ]; then
export DBUS_SESSION_BUS_ADDRESS="unix:path=$dbus_file"
fi

View File

@@ -240,6 +240,10 @@ let
# XDG_RUNTIME_DIR=/run/user/${name}
# '';
# allow env vars to refer to eachother (just re-evaluate them a couple times to compute a fix point, right? :P)
fs.".config/environment.d/21-sane-nixos-users-fix1.conf".symlink.target = "20-sane-nixos-users.conf";
fs.".config/environment.d/22-sane-nixos-users-fix2.conf".symlink.target = "20-sane-nixos-users.conf";
fs.".config/environment.d/20-sane-nixos-users.conf".symlink.text =
let
env = lib.mapAttrsToList