aboutsummaryrefslogtreecommitdiff
path: root/tw/services/wireguard.scm
diff options
context:
space:
mode:
authorTimo Wilken2024-01-14 15:57:49 +0100
committerTimo Wilken2024-01-14 15:57:49 +0100
commitbb87069a30d10c9a26f0af5d12b4c71e1fe2c013 (patch)
tree72ce56167e849d84a330a0fe05a3f43a3e2c0456 /tw/services/wireguard.scm
parentf969809276710f1597da0bd2e9dc95a33ada4296 (diff)
Fix Wireguard host naming
Diffstat (limited to 'tw/services/wireguard.scm')
-rw-r--r--tw/services/wireguard.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/tw/services/wireguard.scm b/tw/services/wireguard.scm
index 1906f70e..b2a34b1f 100644
--- a/tw/services/wireguard.scm
+++ b/tw/services/wireguard.scm
@@ -27,13 +27,13 @@
("btl" "btl/kAgD+DVXsApNn53JCZdgZ9iJvVpFZVpa3Z+rrj4=" #f))))
(map (match-lambda*
- ((i (name public-key port))
- (cons (string-append name ".twilken.net")
+ ((i (short-name public-key port))
+ (cons (string-append short-name ".twilken.net")
(wireguard-peer
- (name (string-append name ".wg"))
- (endpoint (and port (format #f "~a.twilken.net:~d" name port)))
+ (name (string-append short-name ".wg"))
+ (endpoint (and port (format #f "~a.twilken.net:~d" short-name port)))
(public-key public-key)
- (preshared-key (string-append "/etc/wireguard/" name ".psk"))
+ (preshared-key (string-append "/etc/wireguard/" short-name ".psk"))
(allowed-ips (list (format #f "10.0.0.~d/32" (+ i 1))
(format #f "fc00::~d/128" (+ i 1)))))))
(args (error "Unknown peer spec" args)))