dn42: make wireguard.endpoint optional
This commit is contained in:
parent
6ca8d9bb25
commit
150fd52178
|
@ -80,10 +80,12 @@ in {
|
||||||
inherit (conf.wireguard) listenPort privateKey;
|
inherit (conf.wireguard) listenPort privateKey;
|
||||||
ips = [ "${address4}/32" "${address6}/128" ];
|
ips = [ "${address4}/32" "${address6}/128" ];
|
||||||
peers = [ {
|
peers = [ {
|
||||||
inherit (conf.wireguard) endpoint publicKey;
|
inherit (conf.wireguard) publicKey;
|
||||||
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
||||||
persistentKeepalive = 30;
|
persistentKeepalive = 30;
|
||||||
} ];
|
} // (lib.optionalAttrs (conf.wireguard ? endpoint) {
|
||||||
|
inherit (conf.wireguard) endpoint;
|
||||||
|
})];
|
||||||
}) wireguardNeighbors;
|
}) wireguardNeighbors;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user