diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-10-09 10:59:19 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-10-09 10:59:19 +0200 |
commit | 2d97ecb5c4828db7389cf2baf436c3ecc7af1d6c (patch) | |
tree | a8be4bcad1c3a73009e838ecfe561d133256d7e2 /modules/yggdrasil-wg | |
parent | 3804ee85b07ad2904ee8ae27a4ca8c477ddd30e6 (diff) | |
download | nixos-2d97ecb5c4828db7389cf2baf436c3ecc7af1d6c.tar nixos-2d97ecb5c4828db7389cf2baf436c3ecc7af1d6c.tar.gz nixos-2d97ecb5c4828db7389cf2baf436c3ecc7af1d6c.tar.bz2 nixos-2d97ecb5c4828db7389cf2baf436c3ecc7af1d6c.tar.xz nixos-2d97ecb5c4828db7389cf2baf436c3ecc7af1d6c.zip |
yggdrasil-wg: ...
Diffstat (limited to 'modules/yggdrasil-wg')
-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 37ff5f99..7502b3c7 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix | |||
@@ -76,7 +76,7 @@ in { | |||
76 | privateKeyFile = config.sops.secrets."yggdrasil-wg.priv".path; | 76 | privateKeyFile = config.sops.secrets."yggdrasil-wg.priv".path; |
77 | postSetup = '' | 77 | postSetup = '' |
78 | ${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} | 78 | ${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} |
79 | ${concatMapStringsSep "\n" (routeArgs: let other = if routeArgs.from == hostName then routeArgs.to else routeArgs.from; in concatMapStringsSep "\n" (otherIP: concatMapStringsSep "\n" (viaIP: "ip route replace \"${otherIP}\" via \"${viaIP}\" dev \"yggdrasil\" table \"main\"") hostIPs.${routeArgs.via}) hostIPs.${other}) hostRoutes} | 79 | ${concatMapStringsSep "\n" (routeArgs: let other = if routeArgs.from == hostName then routeArgs.to else routeArgs.from; in concatMapStringsSep "\n" (otherIP: concatMapStringsSep "\n" (viaIP: "ip route replace \"${otherIP}\" via \"${viaIP}\" dev \"yggdrasil\" table \"main\"") (map stripSubnet hostIPs.${routeArgs.via})) hostIPs.${other}) hostRoutes} |
80 | ''; | 80 | ''; |
81 | }; | 81 | }; |
82 | }; | 82 | }; |