diff options
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/surtr/vpn/default.nix | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hosts/surtr/vpn/default.nix b/hosts/surtr/vpn/default.nix index f14312be..570fe1da 100644 --- a/hosts/surtr/vpn/default.nix +++ b/hosts/surtr/vpn/default.nix | |||
@@ -59,12 +59,12 @@ in { | |||
59 | PrivateKeyFile = "/etc/wireguard/surtr.priv"; | 59 | PrivateKeyFile = "/etc/wireguard/surtr.priv"; |
60 | ListenPort = 51820; | 60 | ListenPort = 51820; |
61 | }; | 61 | }; |
62 | wireguardPeers = [ | 62 | wireguardPeers = imap1 (i: { name, ip ? i }: { |
63 | { wireguardPeerConfig = { | 63 | wireguardPeerConfig = { |
64 | AllowedIPs = ["${prefix6}:1::/96" "${prefix4}.1/32"]; | 64 | AllowedIPs = ["${prefix6}:${ip}::/96" "${prefix4}.${ip}/32"]; |
65 | PublicKey = trim (readFile ./geri.pub); | 65 | PublicKey = trim (readFile (./. + "${name}.pub")); |
66 | }; | 66 | }; |
67 | } | 67 | }) [ { name = "geri"; } ]; |
68 | ]; | 68 | ]; |
69 | }; | 69 | }; |
70 | }; | 70 | }; |