diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-23 16:43:51 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-23 16:43:51 +0100 |
commit | 7bed60c4ebd1fbffb71b1bffaae809c34462cdfa (patch) | |
tree | 592806144abdaed3d054c29d82ff449a7f6f03cc /modules/yggdrasil-wg/default.nix | |
parent | 2d60c31d43857bca20faf77dd112327fb6a112fc (diff) | |
download | nixos-7bed60c4ebd1fbffb71b1bffaae809c34462cdfa.tar nixos-7bed60c4ebd1fbffb71b1bffaae809c34462cdfa.tar.gz nixos-7bed60c4ebd1fbffb71b1bffaae809c34462cdfa.tar.bz2 nixos-7bed60c4ebd1fbffb71b1bffaae809c34462cdfa.tar.xz nixos-7bed60c4ebd1fbffb71b1bffaae809c34462cdfa.zip |
yggdrasil-wg: ensure routes are set
Diffstat (limited to 'modules/yggdrasil-wg/default.nix')
-rw-r--r-- | modules/yggdrasil-wg/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index 16f8d3a9..cab1276a 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix | |||
@@ -208,19 +208,22 @@ in { | |||
208 | routes = [ | 208 | routes = [ |
209 | { routeConfig = { | 209 | { routeConfig = { |
210 | Destination = "${batSubnet}::/${toString batSubnetLength}"; | 210 | Destination = "${batSubnet}::/${toString batSubnetLength}"; |
211 | GatewayOnLink = true; | ||
211 | }; | 212 | }; |
212 | } | 213 | } |
213 | { routeConfig = { | 214 | { routeConfig = { |
214 | Destination = "${batSubnet}::/${toString batSubnetLength}"; | 215 | Destination = "${batSubnet}::/${toString batSubnetLength}"; |
216 | GatewayOnLink = true; | ||
215 | Table = "yggdrasil"; | 217 | Table = "yggdrasil"; |
216 | }; | 218 | }; |
217 | } | 219 | } |
218 | { routeConfig = { | 220 | { routeConfig = { |
219 | Destination = batHostIPs.${hostName}; | 221 | Destination = batHostIPs.${hostName}; |
222 | GatewayOnLink = true; | ||
220 | Table = "yggdrasil"; | 223 | Table = "yggdrasil"; |
221 | }; | 224 | }; |
222 | } | 225 | } |
223 | ] ++ (concatMap (router: map (rAddr: { routeConfig = { Destination = "::/0"; Gateway = stripSubnet rAddr; Table = "yggdrasil"; }; }) batHostIPs.${router}) routers); | 226 | ] ++ (concatMap (router: map (rAddr: { routeConfig = { Destination = "::/0"; Gateway = stripSubnet rAddr; GatewayOnLink = true; Table = "yggdrasil"; }; }) batHostIPs.${router}) routers); |
224 | routingPolicyRules = map (addr: { routingPolicyRuleConfig = { Table = "yggdrasil"; From = stripSubnet addr; Priority = 1; }; }) batHostIPs.${hostName}; | 227 | routingPolicyRules = map (addr: { routingPolicyRuleConfig = { Table = "yggdrasil"; From = stripSubnet addr; Priority = 1; }; }) batHostIPs.${hostName}; |
225 | linkConfig = { | 228 | linkConfig = { |
226 | MACAddress = "${batHostMACs.${hostName}}"; | 229 | MACAddress = "${batHostMACs.${hostName}}"; |