Nix tools not available in Plasma Mobile wayland session

I just installed Debian 12 on my Surface Pro 6 tablet and have started to use the plasma mobile wayland session. However, I noticed that my nix tools are no longer available in the plasma mobile session. Even sourcing /etc/profile.d/nix.sh does not help. This seems specific to plasma mobile because the nix tools are available when I switch to the normal plasma desktop session. What could be going wrong here?

I’ve managed to find and fix the bug. The issue was that /etc/profile got loaded twice, once by the display manager and once by plasma mobile itself. The fix is t remove the line that sources /etc/profile from the /usr/bin/startplasmamobile script.