MyNixOS website logo
option

networking.wireguard.interfaces.<name>.dynamicEndpointRefreshSeconds

Periodically refresh the endpoint hostname or address for all peers. Allows WireGuard to notice DNS and IPv4/IPv6 connectivity changes. This option can be set or overridden for individual peers.

Setting this to 0 disables periodic refresh.

When networking.wireguard.useNetworkd is enabled, this option deletes the Wireguard interface and brings it back up by reconfiguring the network with networkctl reload on every refresh. This could have adverse effects on your network and cause brief connectivity blips. See systemd/systemd#9911 for an upstream feature request that can make this less hacky.
Declarations
Type
signed integer
Default
0
Example
300