{ lib, ... }:
{
  imports = [
    ./logging.nix
    ./ssl.nix
  ];

  options.services.nginx.domain = lib.mkOption {
    type = lib.types.str;
    description = "The base domain name to append to virtual domain names";
  };

  config.services.nginx = {
    enable = true;
    recommendedTlsSettings = true;
    recommendedOptimisation = true;
    recommendedGzipSettings = true;
    recommendedProxySettings = true;
    clientMaxBodySize = "10G";
    statusPage = true; # For metrics, should be accessible only from localhost
  };
}
