enable ssl

main
Anish Lakhwara 2022-09-20 19:21:22 +10:00
parent 50f7ee786d
commit 36bda6965a
1 changed files with 3 additions and 2 deletions

View File

@ -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"; };
};
};