summary refs log tree commit diff
path: root/nixos/modules/services/networking/nghttpx/frontend-params-submodule.nix
blob: 33c8572bd14fc6cab21ebd78d4121926a335b117 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ lib, ...}:
{ options = {
    tls = lib.mkOption {
      type        = lib.types.enum [ "tls" "no-tls" ];
      default     = "tls";
      description = ''
        Enable or disable TLS. If true (enabled) the key and
        certificate must be configured for nghttpx.

        Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx-f
        for more detail.
      '';
    };

    sni-fwd = lib.mkOption {
      type    = lib.types.bool;
      default = false;
      description = ''
        When performing a match to select a backend server, SNI host
        name received from the client is used instead of the request
        host. See --backend option about the pattern match.

        Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx-f
        for more detail.
      '';
    };

    api = lib.mkOption {
      type        = lib.types.bool;
      default     = false;
      description = ''
        Enable API access for this frontend. This enables you to
        dynamically modify nghttpx at run-time therefore this feature
        is disabled by default and should be turned on with care.

        Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx-f
        for more detail.
      '';
    };

    healthmon = lib.mkOption {
      type        = lib.types.bool;
      default     = false;
      description = ''
        Make this frontend a health monitor endpoint. Any request
        received on this frontend is responded to with a 200 OK.

        Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx-f
        for more detail.
      '';
    };

    proxyproto = lib.mkOption {
      type        = lib.types.bool;
      default     = false;
      description = ''
        Accept PROXY protocol version 1 on frontend connection.

        Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx-f
        for more detail.
      '';
    };
  };
}