tunnels: Respect `phoebe.security.enable' like other services

This allows one to deploy to a virtual machine for testing.
This commit is contained in:
Peter Jones 2019-06-25 16:49:12 -07:00
parent 3399464b17
commit ea9e99d760
No known key found for this signature in database
GPG key ID: 9DAFAA8D01941E49

View file

@ -58,8 +58,8 @@ let
# Create an nginx virtual host for a tunnel account:
virtualHost = account: tunnel: {
"${tunnel.subdomain}.${cfg.hostName}" = {
forceSSL = true;
enableACME = true;
forceSSL = config.phoebe.security.enable;
enableACME = config.phoebe.security.enable;
root = "/var/empty";
locations."/".proxyPass = "http://127.0.0.1:${toString tunnel.serverPort}";
};
@ -133,7 +133,7 @@ in
# Configure a web server to reverse proxy connections to SSH:
services.nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedTlsSettings = config.phoebe.security.enable;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;