nix-conf/system/dev/dn-pre7780/services/nginx.nix
danny 6a71b601f5 update: system update & refactor
# Breaking Changes
- sops location movod to "system/dev/<dev-name>/sops/sops-conf.nix"
- flake devices declaration changes
- whole flake update
2025-10-14 16:49:03 +08:00

33 lines
746 B
Nix

{ config, ... }:
{
networking.firewall.allowedTCPPorts = [
443
80
];
security.acme = {
acceptTerms = true;
defaults = {
validMinDays = 2;
webroot = null;
server = "https://ca.net.dn/acme/acme/directory";
renewInterval = "daily";
email = "danny@pre7780.dn";
dnsResolver = "10.0.0.1:53";
dnsProvider = "pdns";
dnsPropagationCheck = false;
environmentFile = config.sops.secrets."acme/pdns".path;
};
};
users.users.nginx.extraGroups = [ "acme" ];
services.nginx = {
enable = true;
enableReload = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedTlsSettings = true;
recommendedProxySettings = true;
};
}