added ssl

This commit is contained in:
Bryan Ramos 2026-03-12 03:07:09 -04:00
parent a10ba82767
commit e2e6fb5dae

View file

@ -12,29 +12,29 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [ 80 /* 443 */ ]; networking.firewall.allowedTCPPorts = [ 80 443 ];
# security.acme = { security.acme = {
# acceptTerms = true; acceptTerms = true;
# defaults.email = config.user.email; defaults.email = config.user.email;
#
# certs."${domain}" = { certs."${domain}" = {
# domain = "*.${domain}"; domain = "*.${domain}";
# dnsProvider = "namecheap"; dnsProvider = "namecheap";
# environmentFile = "/var/lib/acme/namecheap.env"; environmentFile = "/var/lib/acme/namecheap.env";
# group = "nginx"; group = "nginx";
# }; };
# }; };
services.nginx = { services.nginx = {
enable = true; enable = true;
# recommendedTlsSettings = true; recommendedTlsSettings = true;
recommendedOptimisation = true; recommendedOptimisation = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
virtualHosts."test.${domain}" = { virtualHosts."test.${domain}" = {
# useACMEHost = domain; useACMEHost = domain;
# forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {
return = "200 'nginx is working'"; return = "200 'nginx is working'";
extraConfig = '' extraConfig = ''