2024-12-31 18:45:03 +04:00
|
|
|
{ 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 = ''
|
2024-12-31 18:50:10 +04:00
|
|
|
access_log /var/log/nginx/access.log buffer=32k flush=5m;
|
2024-12-31 18:45:03 +04:00
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|