summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hosts/vidhar/default.nix3
-rw-r--r--modules/yggdrasil-wg/default.nix8
2 files changed, 7 insertions, 4 deletions
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix
index 3c6aeb16..107906c7 100644
--- a/hosts/vidhar/default.nix
+++ b/hosts/vidhar/default.nix
@@ -85,6 +85,9 @@
85 allowedTCPPorts = [ 85 allowedTCPPorts = [
86 22 # ssh 86 22 # ssh
87 ]; 87 ];
88 allowedUDPPorts = [
89 51820 # wireguard
90 ];
88 allowedUDPPortRanges = [ 91 allowedUDPPortRanges = [
89 { from = 60000; to = 61000; } # mosh 92 { from = 60000; to = 61000; } # mosh
90 ]; 93 ];
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";