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