From 207937a4c42e96c26c64bebc68f0eb0425e3cc5b Mon Sep 17 00:00:00 2001
From: Florian Sesser <florian@privatestorage.io>
Date: Wed, 19 May 2021 21:16:59 +0000
Subject: [PATCH] Ignore at least some trailing white space when loading
 pubkeys

---
 nixos/modules/monitoring/vpn/server.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nixos/modules/monitoring/vpn/server.nix b/nixos/modules/monitoring/vpn/server.nix
index 29430ca0..358ca0b0 100644
--- a/nixos/modules/monitoring/vpn/server.nix
+++ b/nixos/modules/monitoring/vpn/server.nix
@@ -4,7 +4,7 @@
   cfg = config.services.private-storage.monitoring.vpn;
   makePeers = peerIPs: pubKeysPath: map (x: {
                   allowedIPs = [ "${x}/32" ];
-                  publicKey = builtins.readFile(pubKeysPath + "/${x}.pub");
+                  publicKey = lib.fileContents(pubKeysPath + "/${x}.pub");
                   presharedKeyFile = toString cfg.server.presharedKeyFile;
                 }) peerIPs;
 
-- 
GitLab