summaryrefslogtreecommitdiff
path: root/modules/vpn.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/vpn.nix')
-rw-r--r--modules/vpn.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/vpn.nix b/modules/vpn.nix
index a3df88a..47c269c 100644
--- a/modules/vpn.nix
+++ b/modules/vpn.nix
@@ -9,13 +9,13 @@ let
ips = [ "${vpn-prefix}::${ip}/128" ];
publicKey = (builtins.readFile ../secrets/${host}-wireguard-key.pub);
endpoint = null;
- relay = false;
+ router = false;
};
hosts = {
dragon = mkConfig "dragon" "d" // {
endpoint = "dragon.orbekk.com:${toString cfg.listenPort}";
- relay = true;
+ router = true;
};
tiny1 = mkConfig "tiny1" "1001" // {
endpoint = "tiny1.orbekk.com:${toString cfg.listenPort}";
@@ -26,7 +26,7 @@ let
mkPeer = hostConfig: {
inherit (hostConfig) publicKey endpoint;
- allowedIPs = hostConfig.ips ++ (lib.optionals (hostConfig.relay && !cfg.is_server) [ "::/0" ]);
+ allowedIPs = if hostConfig.router && !cfg.is_server then [ "::/0" ] else hostConfig.ips;
};
getPeers = host: