diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-10-17 21:16:40 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-10-17 21:16:40 +0200 |
commit | a4b309e27214daf98c70676324418e23578ede22 (patch) | |
tree | dbe68d042ab10eb7d0b0576b1e4db2cc74323e23 /modules | |
parent | 610bf85460c1371aa2af035054b7f9d641132388 (diff) | |
download | nixos-a4b309e27214daf98c70676324418e23578ede22.tar nixos-a4b309e27214daf98c70676324418e23578ede22.tar.gz nixos-a4b309e27214daf98c70676324418e23578ede22.tar.bz2 nixos-a4b309e27214daf98c70676324418e23578ede22.tar.xz nixos-a4b309e27214daf98c70676324418e23578ede22.zip |
yggdrasil-wg: ...
Diffstat (limited to 'modules')
-rw-r--r-- | modules/yggdrasil-wg/default.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index fbb38d26..3bff6458 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix | |||
@@ -91,14 +91,11 @@ let | |||
91 | }; | 91 | }; |
92 | linkConfig = { | 92 | linkConfig = { |
93 | MACAddress = "${greHostMACPrefixes.${hostName}}:${hexIx}"; | 93 | MACAddress = "${greHostMACPrefixes.${hostName}}:${hexIx}"; |
94 | RequiredForOnline = false; | ||
94 | }; | 95 | }; |
95 | networkConfig = { | 96 | networkConfig = { |
96 | Tunnel = "yggre-${other}"; | ||
97 | BatmanAdvanced = "yggdrasil"; | 97 | BatmanAdvanced = "yggdrasil"; |
98 | }; | 98 | }; |
99 | linkConfig = { | ||
100 | RequiredForOnline = false; | ||
101 | }; | ||
102 | }; | 99 | }; |
103 | 100 | ||
104 | trim = str: if hasSuffix "\n" str then trim (removeSuffix "\n" str) else str; | 101 | trim = str: if hasSuffix "\n" str then trim (removeSuffix "\n" str) else str; |
@@ -152,6 +149,9 @@ in { | |||
152 | linkConfig = { | 149 | linkConfig = { |
153 | RequiredForOnline = false; | 150 | RequiredForOnline = false; |
154 | }; | 151 | }; |
152 | networkConfig = { | ||
153 | Tunnel = map (opts@{from, to, ...}: let other = if from == hostName then to else from; in "yggre-${other}") hostLinks; | ||
154 | }; | ||
155 | }; | 155 | }; |
156 | yggdrasil = { | 156 | yggdrasil = { |
157 | name = "yggdrasil"; | 157 | name = "yggdrasil"; |