enable ssl
This commit is contained in:
parent
50f7ee786d
commit
36bda6965a
|
@ -69,6 +69,7 @@
|
|||
serviceConfig = config.services."${serverName}";
|
||||
options = {
|
||||
enable = lib.mkEnableOption "${serverName} service";
|
||||
enableSSL = lib.mkEnableOption "${serverName} SSL for Nginx";
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -95,8 +96,8 @@
|
|||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
services.nginx.enable = true;
|
||||
services.nginx.virtualHosts.${serverName} = {
|
||||
#forceSSL = true;
|
||||
enableACME = true;
|
||||
forceSSL = serviceConfig.enableSSL;
|
||||
enableACME = serviceConfig.enableSSL;
|
||||
locations."/" = { root = "${webRoot}${serverName}"; index = "/home.html"; };
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue