summaryrefslogtreecommitdiff
path: root/modules/yggdrasil-wg
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-10-17 21:25:16 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2021-10-17 21:25:16 +0200
commit238078a6585229c3d8fac56654e11a8d61a3f1cf (patch)
treed6f83991ce1286a2d8e6c156be3ae81516080736 /modules/yggdrasil-wg
parenta4b309e27214daf98c70676324418e23578ede22 (diff)
downloadnixos-238078a6585229c3d8fac56654e11a8d61a3f1cf.tar
nixos-238078a6585229c3d8fac56654e11a8d61a3f1cf.tar.gz
nixos-238078a6585229c3d8fac56654e11a8d61a3f1cf.tar.bz2
nixos-238078a6585229c3d8fac56654e11a8d61a3f1cf.tar.xz
nixos-238078a6585229c3d8fac56654e11a8d61a3f1cf.zip
yggdrasil-wg: ...
Diffstat (limited to 'modules/yggdrasil-wg')
-rw-r--r--modules/yggdrasil-wg/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix
index 3bff6458..04e9b02e 100644
--- a/modules/yggdrasil-wg/default.nix
+++ b/modules/yggdrasil-wg/default.nix
@@ -64,7 +64,7 @@ let
64 in { 64 in {
65 AllowedIPs = wgHostIPs.${other}; # ++ concatMap (rArgs: if rArgs.from != hostName || rArgs.via != to then [] else wgHostIPs.${rArgs.to}) routes; 65 AllowedIPs = wgHostIPs.${other}; # ++ concatMap (rArgs: if rArgs.from != hostName || rArgs.via != to then [] else wgHostIPs.${rArgs.to}) routes;
66 PublicKey = trim (readFile (mkPublicKeyPath other)); 66 PublicKey = trim (readFile (mkPublicKeyPath other));
67 } // (optionalAttrs (from == hostName) (filterAttrs (n: _v: !(elem n ["from" "to" "endpointHost" "udp2raw"])) opts // optionalAttrs (opts ? "endpointHost") (if opts ? "udp2raw" then { Endpoint = "127.0.0.1:${toString (udp2rawPort + opts.udp2raw)}"; } else { Endpoint = "${opts.endpointHost}:${toString listenPort}"; }))); 67 } // (optionalAttrs (from == hostName) (filterAttrs (n: _v: !(elem n ["from" "to" "endpointHost" "udp2raw"])) opts // optionalAttrs (opts ? "endpointHost" && from == hostName) (if opts ? "udp2raw" then { Endpoint = "127.0.0.1:${toString (udp2rawPort + opts.udp2raw)}"; } else { Endpoint = "${opts.endpointHost}:${toString listenPort}"; })));
68 linkToGreDev = opts@{from, to, ...}: 68 linkToGreDev = opts@{from, to, ...}:
69 let 69 let
70 other = if from == hostName then to else from; 70 other = if from == hostName then to else from;