From 356546a377e8f16b497efc24090bb6926c0d0d5e Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 8 Nov 2019 19:15:06 -0800 Subject: only make the vpnExtraConfig if enableVpn --- Com/Simatime/buildOS.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Com/Simatime/buildOS.nix b/Com/Simatime/buildOS.nix index 50d5908..979555d 100644 --- a/Com/Simatime/buildOS.nix +++ b/Com/Simatime/buildOS.nix @@ -10,11 +10,11 @@ assert enableVpn -> builtins.isString ipAddress; assert enableVpn -> builtins.isString vpnRsaPrivateKeyFile; assert enableVpn -> builtins.isString vpnEd25519PrivateKeyFile; let - vpnExtraConfig = '' + vpnExtraConfig = if enableVpn then '' ConnectTo = ${vpnConnectTo} Ed25519PrivateKeyFile = "${vpnEd25519PrivateKeyFile}" PrivateKeyFile = "${vpnRsaPrivateKeyFile}" - ''; + '' else ""; defaults = { boot.cleanTmpDir = true; #networking.interfaces.simatime-vpn = [{ ipv4.address = ipAddress; }]; -- cgit v1.2.3