Connection problems on Wayvnc on Nix Hyprland

I am posting this here since wayvnc works perfectly on an Arch-based Hyprland implementation, but on my Nix Hyprland running 23.11 I can’t get two different VNC clients to connect.

Wayvnc installs fine, and when I activate it, wayvnc 0.0.0.0 it appears to be functioning. If I look to see if the appropriate port is listening using lsof -i -P -n it gives me the right output (same as on my Arch Hyprland):

wayvnc 7518 userXX 9u IPv4 57528 0t0 TCP *:5900 (LISTEN)

The VNC client that has a log (RealVNC) says that it timedout due to a lack of response from the computer.

Has anyone gotten wayvnc to work on a Nix Hyprland setup? Any specific configurations used?
Thanks in advance for any help.

1 Like

I was having the same problem. Adding this to my nixos config worked:

networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 22 80 443 5900 ];

I believe the 5900 is the important part here, that’s the default VNC port that wayvnc uses. Probably could also get away with systemctl stop firewall but I wouldn’t recommend doing that.