summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-07-29 11:13:59 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-07-29 11:13:59 +0200
commitf57302b0c3ccd17f5cb491f1a9f72ff132cf72f4 (patch)
tree25813669b221851d8fcde0a484bad370b4ff422a
parent6c625841484deeec0ab48ce79223a6efff6c35b3 (diff)
downloadnixos-f57302b0c3ccd17f5cb491f1a9f72ff132cf72f4.tar
nixos-f57302b0c3ccd17f5cb491f1a9f72ff132cf72f4.tar.gz
nixos-f57302b0c3ccd17f5cb491f1a9f72ff132cf72f4.tar.bz2
nixos-f57302b0c3ccd17f5cb491f1a9f72ff132cf72f4.tar.xz
nixos-f57302b0c3ccd17f5cb491f1a9f72ff132cf72f4.zip
...
-rw-r--r--hosts/surtr/vpn/default.nix12
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 };