nixpkgs/nixos/modules/services/networking/nghttpx/frontend-params-submodule.nix
pennae 2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00

65 lines
2.0 KiB
Nix

{ lib, ...}:
{ options = {
tls = lib.mkOption {
type = lib.types.enum [ "tls" "no-tls" ];
default = "tls";
description = lib.mdDoc ''
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 = lib.mdDoc ''
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 = lib.mdDoc ''
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 = lib.mdDoc ''
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 = lib.mdDoc ''
Accept PROXY protocol version 1 on frontend connection.
Please see https://nghttp2.org/documentation/nghttpx.1.html#cmdoption-nghttpx-f
for more detail.
'';
};
};
}