nginx/module.nix: init

This commit is contained in:
Charlie Root 2025-04-06 22:59:18 +02:00
commit 982125fd1d
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E

View file

@ -0,0 +1,33 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf mkDefault;
inherit (lib.options) mkEnableOption;
cfg = config.modules.system.services.nginx;
in {
options.modules.system.services.nginx.enable = mkEnableOption "nginx";
config = mkIf cfg.enable {
security = {
acme = {
acceptTerms = true;
defaults.email = "charlie@charlieroot.dev";
};
};
services.nginx = {
package = pkgs.nginxQuic;
statusPage = true;
recommendedTlsSettings = true;
recommendedBrotliSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
recommendedZstdSettings = true;
clientMaxBodySize = mkDefault "512m";
};
};
}