Hi there,
I realized that something like NIXOS_XDG_OPEN_USE_PORTAL=1 xdg-open http://google.com does not work as expected because the dbus environment does not contain the PATH. Apparently there is also a pull request open on the home-manager repo to add this variable to the default Sway environment.
I think it would make sense to add this to the /etc/scroll/config.d/nixos.conf config file. home-manager apparently also sets the following additional env vars:
"XDG_CURRENT_DESKTOP"
"XDG_SESSION_TYPE"
"NIXOS_OZONE_WL"
"XCURSOR_THEME"
"XCURSOR_SIZE"
Maybe those should be added too?