Merge branch 'compat-24.11'
This commit is contained in:
commit
91ed1abe65
12
peering.nix
12
peering.nix
|
@ -93,13 +93,11 @@ in
|
|||
in
|
||||
mapAttrsToList
|
||||
(name: peer: {
|
||||
wireguardPeerConfig = {
|
||||
PublicKey = peer.wireguardKey;
|
||||
AllowedIPs = [ peer.ipv4 peer.ipv6 ]
|
||||
++ optionals peer.isRouter [ "10.127.0.0/16" "fd70:81ca:0f8f::/48" ];
|
||||
Endpoint = mkIf (canDirectPeer host peer) "${peer.endpoint}:${toString peer.port}";
|
||||
PersistentKeepalive = mkIf (peer.subnet != host.subnet) cfg.persistentKeepalive;
|
||||
};
|
||||
PublicKey = peer.wireguardKey;
|
||||
AllowedIPs = [ peer.ipv4 peer.ipv6 ]
|
||||
++ optionals peer.isRouter [ "10.127.0.0/16" "fd70:81ca:0f8f::/48" ];
|
||||
Endpoint = mkIf (canDirectPeer host peer) "${peer.endpoint}:${toString peer.port}";
|
||||
PersistentKeepalive = mkIf (peer.subnet != host.subnet) cfg.persistentKeepalive;
|
||||
})
|
||||
(filterAttrs (name: peer: peer != host && (canDirectPeer host peer || canDirectPeer peer host)) hosts);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue