I set it ages ago in .pam_environment and forgot about it, but it isn’t picked up anymore. According to the Arch wiki ~/.pam_environment it is deprecated, but I don’t find anything that it shouldn’t work anymore. ~/.pam_environment is gone:
Yes, that works. As soon as MOZ_ENABLE_WAYLAND=1 is present everything is back to normal.