summaryrefslogtreecommitdiff
path: root/Com/Simatime/buildOS.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-11-08 19:15:06 -0800
committerBen Sima <ben@bsima.me>2019-11-08 19:15:06 -0800
commit356546a377e8f16b497efc24090bb6926c0d0d5e (patch)
tree0e7b09541259da4f117869fd0e2bd0481660c42b /Com/Simatime/buildOS.nix
parent58520c7a7e879b9a937df41412b7823e8557c781 (diff)
only make the vpnExtraConfig if enableVpn
Diffstat (limited to 'Com/Simatime/buildOS.nix')
-rw-r--r--Com/Simatime/buildOS.nix4
1 files 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; }];