diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2022-05-31 18:10:56 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2022-05-31 18:35:33 -0400 |
commit | ee88a3fbd5479d71e2ea9edd7ee162f699e574e1 (patch) | |
tree | b2c68de36114835f7fd5be298a866427c8b2ac3e /modules/vpn.nix | |
parent | c2562003f5e47bafea8c3af1520fe75353cbde32 (diff) |
Update to nixos-22.05
Diffstat (limited to 'modules/vpn.nix')
-rw-r--r-- | modules/vpn.nix | 6 |
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: |