diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-10-10 13:40:40 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-10-10 13:40:40 +0200 |
commit | aa2c9c9b39297e930a1fdfd81827c707873878ba (patch) | |
tree | 41aa94b61500ce00f9ba4c808e55edc88886a28e /modules/yggdrasil-wg/default.nix | |
parent | 36f532f5dda1cd1a9bc9a4061f9e218bc2126dec (diff) | |
download | nixos-aa2c9c9b39297e930a1fdfd81827c707873878ba.tar nixos-aa2c9c9b39297e930a1fdfd81827c707873878ba.tar.gz nixos-aa2c9c9b39297e930a1fdfd81827c707873878ba.tar.bz2 nixos-aa2c9c9b39297e930a1fdfd81827c707873878ba.tar.xz nixos-aa2c9c9b39297e930a1fdfd81827c707873878ba.zip |
yggdrasil-wg: ...
Diffstat (limited to 'modules/yggdrasil-wg/default.nix')
-rw-r--r-- | modules/yggdrasil-wg/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index 6b0405d9..73f8c368 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix | |||
@@ -74,7 +74,7 @@ in { | |||
74 | allowedIPsAsRoutes = false; | 74 | allowedIPsAsRoutes = false; |
75 | inherit listenPort; | 75 | inherit listenPort; |
76 | ips = hostIPs.${hostName}; | 76 | ips = hostIPs.${hostName}; |
77 | peers = imap0 linkToPeer hostLinks; | 77 | peers = filter (value: value != null) (imap0 (ix: opts@{to, from, ...}: if from == hostName || to == hostName then linkToPeer ix opts else null) links); |
78 | privateKeyFile = config.sops.secrets."yggdrasil-wg.priv".path; | 78 | privateKeyFile = config.sops.secrets."yggdrasil-wg.priv".path; |
79 | postSetup = '' | 79 | postSetup = '' |
80 | ${concatMapStringsSep "\n" (linkArgs: let other = if linkArgs.from == hostName then linkArgs.to else linkArgs.from; in concatMapStringsSep "\n" (otherIP: "ip route replace \"${otherIP}\" dev \"yggdrasil\" table \"main\"") hostIPs.${other}) hostLinks} | 80 | ${concatMapStringsSep "\n" (linkArgs: let other = if linkArgs.from == hostName then linkArgs.to else linkArgs.from; in concatMapStringsSep "\n" (otherIP: "ip route replace \"${otherIP}\" dev \"yggdrasil\" table \"main\"") hostIPs.${other}) hostLinks} |