summaryrefslogtreecommitdiff
path: root/modules/nixos/server/mixins/nginx.nix
blob: ba18ecfefca0931e78855ad0c70b33d30f0cc2a7 (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.server.mixins.nginx;
in {
  options.server.mixins.nginx = {
    enable = lib.mkEnableOption "nginx mixin";
  };

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

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