From 3e40fe73f89e6797a95b5fcfc2404501a6b64a01 Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 5 Oct 2024 07:17:51 +0000 Subject: [PATCH] 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 --- hosts/common/programs/assorted.nix | 2 +- modules/users/default.nix | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hosts/common/programs/assorted.nix b/hosts/common/programs/assorted.nix index a50e71469..1076aaccc 100644 --- a/hosts/common/programs/assorted.nix +++ b/hosts/common/programs/assorted.nix @@ -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 diff --git a/modules/users/default.nix b/modules/users/default.nix index 8bba46837..490756150 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -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