Impossible to setup WireGuard in Gnome settings with peers

I was trying to setup WireGuard on my Fedora 40 laptop to connect to my Unifi Network controller but ran into problems.

I could set it up and get it working from the command line but every WireGuard command required sudo. Then when I turned off the VPN in Gnome (because I’m at home and don’t need it) it didn’t disappear but the switch did.

So I decided, hey, maybe I can just set it up in Gnome directly! Well not so fast… There seems to be multiple UI bugs.

  1. I could input all the base settings, WireGuard, and IPv4, but the “Add” button was disabled until I checked the “Make available to other users”. Strange… I’m the only user so not a big deal but it shouldn’t be required…
  2. I needed to add the “Peers” section so I clicked the + and started typing my settings but when I switched to the terminal to copy my public key the Peers popup disappears and loses everything I already typed in!

I also was able to reproduce the problem on my F40 desktop so it’s not unique to my laptop.

It is best to report those issues upstream.
You can still import the WireGuard profile to NetworkManager:
Can't use systemctl to start wireguard interface in Fedora 38 - #2 by vgaetera

That was indeed way easier… I could report to upstream Gnome, but I’m on enough mailing lists / bugzillas. I just want stuff to work. It’s crazy how this was missed.