59 lines
1.4 KiB
Django/Jinja
59 lines
1.4 KiB
Django/Jinja
[connection]
|
|
id={{ nmconnection.id }}
|
|
uuid={{ nmconnection.uuid }}
|
|
type={{ nmconnection.type }}
|
|
interface-name={{ nmconnection.interface_name }}
|
|
permissions=
|
|
|
|
{% if nmconnection.type is 'wifi' %}
|
|
[wifi]
|
|
mode={{ nmconnection.wifi.mode | default('infrastructure') }}
|
|
ssid={{ nmconnection.wifi.ssid }}
|
|
cloned-mac-address={{ nmconnection.wifi.cloned_mac_address | default('random') }}
|
|
|
|
[wifi-security]
|
|
{% if nmconnection.wifi.key_mgmt is 'wep %}
|
|
auth-alg={{ nmconnection.wifi.auth_alg }}
|
|
{% else %}
|
|
auth-alg=open
|
|
{% endif %}
|
|
key-mgmt={{ nmconnection.wifi.key_mgmt }}
|
|
{% if nmconnection.wifi.key_mgmt is 'wpa-psk' %}
|
|
psk={{ nmconnection.wifi.psk }}
|
|
psk-flags=0
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if nmconnection.type is 'wireguard %}
|
|
[wireguard]
|
|
private-key={{ nmconnection.wireguard.private_key }}
|
|
{% if nmconnection.wireguard.listen_port is defined %}
|
|
listen-port={{ nmconnection.wireguard.listen_port }}
|
|
{% endif %}
|
|
fwmark={{ wgpeer.fwmark | default(0) }}
|
|
|
|
{% for wgpeer in nmconnection.wireguard.peers %}
|
|
[wireguard-peer.{{ wgpeer.public_key }}]
|
|
{% if wgpeer.endpoint is defined %}
|
|
endpoint={{ wgpeer.endpoint }}
|
|
{% endif %}
|
|
persistent-keepalive={{ wgpeer.persistent_keepalive | default(0) }}
|
|
allowed-ips={{ wgpeer.allowed_ips | join(',') }}
|
|
{% if wgpeer.preshared_key is defined %}
|
|
preshared-key={{ wgpeer.preshared_key }}
|
|
preshared-key-flags=0
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
[ipv4]
|
|
dns-search=
|
|
method=disabled
|
|
|
|
[ipv6]
|
|
addr-gen-mode=stable-privacy
|
|
dns-search=
|
|
method=ignore
|
|
|
|
[proxy]
|