summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/yggdrasil-wg/default.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix
index 04e9b02e..37adc562 100644
--- a/modules/yggdrasil-wg/default.nix
+++ b/modules/yggdrasil-wg/default.nix
@@ -72,7 +72,7 @@ let
72 netdevConfig = { 72 netdevConfig = {
73 Name = "yggre-${other}"; 73 Name = "yggre-${other}";
74 Kind = "ip6gretap"; 74 Kind = "ip6gretap";
75 MTUBytes = toString 1280; 75 MTUBytes = toString (1280 + 32);
76 }; 76 };
77 tunnelConfig = { 77 tunnelConfig = {
78 Local = stripSubnet wgHostIPs.${hostName}; 78 Local = stripSubnet wgHostIPs.${hostName};
@@ -123,7 +123,7 @@ in {
123 netdevConfig = { 123 netdevConfig = {
124 Name = "yggdrasil-wg"; 124 Name = "yggdrasil-wg";
125 Kind = "wireguard"; 125 Kind = "wireguard";
126 MTUBytes = toString (1280 + 70); 126 MTUBytes = toString (1280 + 32 + 70);
127 }; 127 };
128 wireguardConfig = { 128 wireguardConfig = {
129 PrivateKeyFile = config.sops.secrets."yggdrasil-wg.priv".path; 129 PrivateKeyFile = config.sops.secrets."yggdrasil-wg.priv".path;
@@ -135,6 +135,7 @@ in {
135 netdevConfig = { 135 netdevConfig = {
136 Name = "yggdrasil"; 136 Name = "yggdrasil";
137 Kind = "batadv"; 137 Kind = "batadv";
138 MTUBytes = 1280:
138 }; 139 };
139 }; 140 };
140 } // listToAttrs (map linkToGreDev hostLinks); 141 } // listToAttrs (map linkToGreDev hostLinks);
@@ -146,6 +147,12 @@ in {
146 Name = "yggdrasil-wg"; 147 Name = "yggdrasil-wg";
147 }; 148 };
148 address = [wgHostIPs.${hostName}]; 149 address = [wgHostIPs.${hostName}];
150 routes = [
151 { routeConfig = {
152 Destination = "${wgSubnet}/${toString wgSubnetLength}";
153 };
154 }
155 ];
149 linkConfig = { 156 linkConfig = {
150 RequiredForOnline = false; 157 RequiredForOnline = false;
151 }; 158 };
@@ -159,6 +166,12 @@ in {
159 Name = "yggdrasil"; 166 Name = "yggdrasil";
160 }; 167 };
161 address = batHostIPs.${hostName}; 168 address = batHostIPs.${hostName};
169 routes = [
170 { routeConfig = {
171 Destination = "${batSubnet}/${toString batSubnetLength}";
172 };
173 }
174 ];
162 linkConfig = { 175 linkConfig = {
163 RequiredForOnline = false; 176 RequiredForOnline = false;
164 }; 177 };