arch-setup/templates/desktop/network/wg0.netdev.j2
Sonny Bakker 8e7d6db56b Remove template timestamps & move tasks to handlers
These changes will prevent services from being restarted without any changes
whenever no changes have been made
2024-03-16 10:36:59 +01:00

22 lines
531 B
Django/Jinja

[NetDev]
Name={{ vpn_interface }}
Kind=wireguard
Description=WireGuard tunnel {{ vpn_interface }}
[WireGuard]
# PrivateKeyFile option does not seem to work, perhaps a bug?
PrivateKey={{ vpn_private_key }}
{% for peer in vpn_peers %}
[WireGuardPeer]
PublicKey={{ peer.public_key }}
# PresharedKeyFile option does not seem to work, perhaps a bug?
PresharedKey={{ peer.preshared_key }}
AllowedIPs={{ peer.allowd_ips }}
{% if peer.endpoint %}
Endpoint={{ peer.endpoint }}
{% endif %}
{% if not loop.last %}
{% endif %}
{% endfor %}