Source: nix Nix now supports the XDG Base Directory Specification when the config switch use-xdg-base-directories is turned on. See man nix.conf(5).
https://manpages.debian.org/bookworm/nix-bin/nix.conf.5.en.html I don't think that a migration inside the nix-setup-systemd package is possible without breaking users. One for example might have used the $HOME/.profile/bin path in systemd user services. So I propose the addition of another setup package, e.g. "nix-setup-systemd-xdg" which turns use-xdg-base-directories on and changes /usr/share/user-tmpfiles.d/nix-daemon.conf /etc/nix/nix.conf and /usr/lib/environment.d/nix-daemon.conf accordingly.