[NetDev] Name=wg1 Kind=wireguard Description=WireGuard VPN wg1 [WireGuard] ListenPort=51821 PrivateKey={{ lookup('file', '/home/xenrox/decrypted/wireguard_vpn/xenrox.net.key') }} {% for client in wireguard_clients %} [WireGuardPeer] PublicKey={{ lookup('file', '/home/xenrox/decrypted/wireguard_vpn/' ~ client.name ~ '.pub') }} PresharedKey={{ lookup('file', '/home/xenrox/decrypted/wireguard_vpn/' ~ client.name ~ '.psk') }} AllowedIPs={{ client.address }}/32 {% endfor %}