summaryrefslogtreecommitdiff
path: root/modules/nixos/traits/nginx.nix
blob: 06937195691f2e82faa0360b0d1b6d06b9040302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  config,
  lib,
  ...
}: let
  cfg = config.traits.nginx;
in {
  options.traits.nginx = {
    defaultConfiguration = lib.mkEnableOption "default nginx configuration";
  };

  config = lib.mkIf cfg.defaultConfiguration {
    services.nginx = {
      enable = true;

      recommendedBrotliSettings = true;
      recommendedGzipSettings = true;
      recommendedOptimisation = true;
      recommendedProxySettings = true;
      recommendedTlsSettings = true;
      recommendedZstdSettings = true;
    };
  };
}