diff --git a/peering.nix b/peering.nix index 9be32f5..9c97bd1 100644 --- a/peering.nix +++ b/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); };