This is already enabled by default on GNOME.
I believe enabling the service in GNOME Control Center or using grdctl
and then opening the firewall ports should be sufficient:
networking.firewall.allowedTCPPorts = [ 3389 ];
networking.firewall.allowedUDPPorts = [ 3389 ];
But I have not really tested it. We have an issue about that Documentation/feature: How to configure GNOME Remote Desktop · Issue #266774 · NixOS/nixpkgs · GitHub