cluster/services/wireguard: add extra routes

This commit is contained in:
Max Headroom 2022-08-04 00:27:21 +02:00
parent 31d9afaef5
commit 70ee7d9ccf
2 changed files with 3 additions and 1 deletions

View file

@ -24,6 +24,7 @@ in
inherit meshNet; inherit meshNet;
pubKey = "NpeB8O4erGTas1pz6Pt7qtY9k45YV6tcZmvvA4qXoFk="; pubKey = "NpeB8O4erGTas1pz6Pt7qtY9k45YV6tcZmvvA4qXoFk=";
privKeyFile = ./mesh-keys/VEGAS.age; privKeyFile = ./mesh-keys/VEGAS.age;
extraRoutes = [ "${hosts.VEGAS.interfaces.vstub.addr}/32" "10.10.0.0/16" ];
}; };
}; };
mesh-node-prophet = { mesh-node-prophet = {
@ -33,6 +34,7 @@ in
inherit meshNet; inherit meshNet;
pubKey = "MMZAbRtNE+gsLm6DJy9VN/Y39E69oAZnvOcFZPUAVDc="; pubKey = "MMZAbRtNE+gsLm6DJy9VN/Y39E69oAZnvOcFZPUAVDc=";
privKeyFile = ./mesh-keys/prophet.age; privKeyFile = ./mesh-keys/prophet.age;
extraRoutes = [];
}; };
}; };
}; };

View file

@ -8,7 +8,7 @@ let
peerLink = cluster.config.links."mesh-node-${peerName}"; peerLink = cluster.config.links."mesh-node-${peerName}";
in { in {
publicKey = peerLink.extra.pubKey; publicKey = peerLink.extra.pubKey;
allowedIPs = [ "${peerLink.extra.meshIp}/32" ]; allowedIPs = [ "${peerLink.extra.meshIp}/32" ] ++ peerLink.extra.extraRoutes;
endpoint = peerLink.tuple; endpoint = peerLink.tuple;
}; };
in in