To import a wireguard config to NetworkManager in linux, use the following command:
sudo nmcli connection import type wireguard file yourvpn.conf
This can be helpful because adding a wireguard configuration manually in desktop environments like KDE doesn’t always work.