1{ lib, ...}:
2{ options = {
3 tls = lib.mkOption {
4 type = lib.types.enum [ "tls" "no-tls" ];
5 default = "tls";
6 description = lib.mdDoc ''
7 Enable or disable TLS. If true (enabled) the key and
8 certificate must be configured for nghttpx.
9
10 Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx-f
11 for more detail.
12 '';
13 };
14
15 sni-fwd = lib.mkOption {
16 type = lib.types.bool;
17 default = false;
18 description = lib.mdDoc ''
19 When performing a match to select a backend server, SNI host
20 name received from the client is used instead of the request
21 host. See --backend option about the pattern match.
22
23 Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx-f
24 for more detail.
25 '';
26 };
27
28 api = lib.mkOption {
29 type = lib.types.bool;
30 default = false;
31 description = lib.mdDoc ''
32 Enable API access for this frontend. This enables you to
33 dynamically modify nghttpx at run-time therefore this feature
34 is disabled by default and should be turned on with care.
35
36 Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx-f
37 for more detail.
38 '';
39 };
40
41 healthmon = lib.mkOption {
42 type = lib.types.bool;
43 default = false;
44 description = lib.mdDoc ''
45 Make this frontend a health monitor endpoint. Any request
46 received on this frontend is responded to with a 200 OK.
47
48 Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx-f
49 for more detail.
50 '';
51 };
52
53 proxyproto = lib.mkOption {
54 type = lib.types.bool;
55 default = false;
56 description = lib.mdDoc ''
57 Accept PROXY protocol version 1 on frontend connection.
58
59 Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx-f
60 for more detail.
61 '';
62 };
63 };
64}