From 0def8276dae29f0329d48b8f7000f30c88986b80 Mon Sep 17 00:00:00 2001 From: Florian Sesser <florian@privatestorage.io> Date: Wed, 19 May 2021 21:56:40 +0000 Subject: [PATCH] That named function does not need any parameters at all --- nixos/modules/monitoring/vpn/server.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/modules/monitoring/vpn/server.nix b/nixos/modules/monitoring/vpn/server.nix index 358ca0b0..13a25175 100644 --- a/nixos/modules/monitoring/vpn/server.nix +++ b/nixos/modules/monitoring/vpn/server.nix @@ -2,11 +2,11 @@ { lib, config, ... }: let cfg = config.services.private-storage.monitoring.vpn; - makePeers = peerIPs: pubKeysPath: map (x: { - allowedIPs = [ "${x}/32" ]; - publicKey = lib.fileContents(pubKeysPath + "/${x}.pub"); - presharedKeyFile = toString cfg.server.presharedKeyFile; - }) peerIPs; + makePeers = map (x: { + allowedIPs = [ "${x}/32" ]; + publicKey = lib.fileContents(cfg.server.pubKeysPath + "/${x}.pub"); + presharedKeyFile = toString cfg.server.presharedKeyFile; + }) cfg.server.vpnClientIPs; in { options.services.private-storage.monitoring.vpn.server = { @@ -74,7 +74,7 @@ in { ips = [ "${cfg.server.ip}/24" ]; listenPort = cfg.server.port; privateKeyFile = toString cfg.server.privateKeyFile; - peers = makePeers cfg.server.vpnClientIPs cfg.server.pubKeysPath; + peers = makePeers; }; }; } -- GitLab