nixos/modules/server/nginx.nix
2024-12-31 18:50:10 +04:00

31 lines
734 B
Nix

{ config, lib, ... }:
with lib;
let cfg = config.void.server.nginx;
in {
imports = [ ./dns ];
options.void.server.nginx = { enable = mkEnableOption false; };
config = mkIf cfg.enable {
security.acme = {
acceptTerms = true;
defaults.email = "Sayeko@proton.me";
};
services.nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedBrotliSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
recommendedZstdSettings = true;
commonHttpConfig = ''
access_log /var/log/nginx/access.log buffer=32k flush=5m;
error_log /var/log/nginx/error.log warn;
'';
};
};
}