nixfiles/profiles/nginx.nix

41 lines
888 B
Nix
Raw Normal View History

2022-12-15 14:58:34 +00:00
{
pkgs,
lib,
...
}: {
options = {
services.nginx.virtualHosts = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule {
config.http3 = lib.mkDefault true;
});
};
2022-12-15 14:58:34 +00:00
};
config = {
security.acme = {
defaults = {email = "chaoticryptidz@owo.monster";};
acceptTerms = true;
};
services.nginx = {
enable = true;
package = pkgs.nginxQuic;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
commonHttpConfig = "";
clientMaxBodySize = lib.mkDefault "512m";
serverNamesHashBucketSize = 1024;
};
services.logrotate.settings.nginx = {
minsize = "50M";
rotate = "4"; # 4 files of 50mb each
compress = "";
};
services.logrotate.settings.nginx.enable = true;
2021-12-28 21:42:46 +00:00
};
2022-11-02 11:32:03 +00:00
}