Skip to content

Commit 7d1e74a

Browse files
committed
correct key names / locations for auto reconnect
1 parent 7d4d90c commit 7d1e74a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/templates.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ commit; save
5959

6060
const nixosPeerConf = `networking.wireguard.interfaces = {{ "{" }}
6161
dsnet = {{ "{" }}
62-
dynamicEndpointRefreshSeconds = 5; # restart on failure (e.g. DNS issue)
63-
dynamicEndpointRefreshSeconds = 300; # refresh DNS periodically
6462
ips = [
6563
{{ if gt (.Server.Network.IPNet.IP | len) 0 -}}
6664
"{{ .Peer.IP }}/{{ .CidrSize }}"
@@ -87,6 +85,8 @@ const nixosPeerConf = `networking.wireguard.interfaces = {{ "{" }}
8785
];
8886
endpoint = "{{ .Endpoint }}:{{ .Server.ListenPort }}";
8987
persistentKeepalive = {{ .Server.PersistentKeepalive }};
88+
dynamicEndpointRefreshRestartSeconds = 5; # restart on failure (e.g. DNS issue)
89+
dynamicEndpointRefreshSeconds = 300; # refresh DNS periodically
9090
{{ "}" }}
9191
];
9292
{{ "};" }}

0 commit comments

Comments
 (0)