Merge branch 'compat-24.11'

This commit is contained in:
Katherina Walshe-Grey 2024-12-25 02:21:25 +00:00
commit 91ed1abe65

View file

@ -93,13 +93,11 @@ in
in in
mapAttrsToList mapAttrsToList
(name: peer: { (name: peer: {
wireguardPeerConfig = {
PublicKey = peer.wireguardKey; PublicKey = peer.wireguardKey;
AllowedIPs = [ peer.ipv4 peer.ipv6 ] AllowedIPs = [ peer.ipv4 peer.ipv6 ]
++ optionals peer.isRouter [ "10.127.0.0/16" "fd70:81ca:0f8f::/48" ]; ++ optionals peer.isRouter [ "10.127.0.0/16" "fd70:81ca:0f8f::/48" ];
Endpoint = mkIf (canDirectPeer host peer) "${peer.endpoint}:${toString peer.port}"; Endpoint = mkIf (canDirectPeer host peer) "${peer.endpoint}:${toString peer.port}";
PersistentKeepalive = mkIf (peer.subnet != host.subnet) cfg.persistentKeepalive; PersistentKeepalive = mkIf (peer.subnet != host.subnet) cfg.persistentKeepalive;
};
}) })
(filterAttrs (name: peer: peer != host && (canDirectPeer host peer || canDirectPeer peer host)) hosts); (filterAttrs (name: peer: peer != host && (canDirectPeer host peer || canDirectPeer peer host)) hosts);
}; };