Wayland screen sharing inside NixOS container?

I’m experimenting a bit with using Wayland, specifically the Hyprland compositor. Beside a few crashes, it has been working really well.

The main problem I have is that I’m unable to do screen sharing in Firefox (or Chromium) when running the browser inside a NixOS container. I do that for work so it is pretty important for me, and it used to work fine under xorg. I have xdg-desktop-portal-hyprland running and screen sharing works fine outside the container.

Has anybody managed to solve this in a nice way?

What happens when trying to screenshare? Have you made sure the apps are running natively on Wayland and not using Xwayland? This would prevent them from seeing other Wayland windows. Firefox needs specific flags to use Wayland natively, not sure about Chrome.