Transport layer failure when connecting to RDP server

I’m trying to set up the simplest possible remote desktop setup between two hosts on the same network:

networking.firewall.allowedTCPPorts = [ 3389 ];
services.gnome.gnome-remote-desktop.enable = true;

However, after running this on a host and rebooting there seems to be something wrong with the setup. I’ve tried connecting from another NixOS host with gnome-connections and remmina, and both of them print the same error:

[ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]

This is not the same error that I get when connecting to another host on the same network which is reachable via SSH, so it seems it’s actually reaching the remote RDP server, but not able to communicate “properly”. The SSH server on the target host is also reachable.

All machines involved are NixOS 22.05, running GNOME with Wayland.

Hosted by Flying Circus.