diff options
author | pennae <github@quasiparticle.net> | 2022-07-28 23:19:15 +0200 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2022-07-30 15:16:34 +0200 |
commit | 2e751c0772b9d48ff6923569adfa661b030ab6a2 (patch) | |
tree | 0accd740380b7b7fe3ea5965a3a4517674e79260 /nixos/modules/services/web-apps/nifi.nix | |
parent | 52b0ad17e3727fe0c3ca028787128ede5fb86352 (diff) | |
download | nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.gz nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.bz2 nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.lz nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.xz nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.zst nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.zip |
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.
Diffstat (limited to 'nixos/modules/services/web-apps/nifi.nix')
-rw-r--r-- | nixos/modules/services/web-apps/nifi.nix | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/nixos/modules/services/web-apps/nifi.nix b/nixos/modules/services/web-apps/nifi.nix index 21a631272641..e3f30c710e0c 100644 --- a/nixos/modules/services/web-apps/nifi.nix +++ b/nixos/modules/services/web-apps/nifi.nix @@ -33,25 +33,25 @@ in { type = lib.types.package; default = pkgs.nifi; defaultText = lib.literalExpression "pkgs.nifi"; - description = "Apache NiFi package to use."; + description = lib.mdDoc "Apache NiFi package to use."; }; user = lib.mkOption { type = lib.types.str; default = "nifi"; - description = "User account where Apache NiFi runs."; + description = lib.mdDoc "User account where Apache NiFi runs."; }; group = lib.mkOption { type = lib.types.str; default = "nifi"; - description = "Group account where Apache NiFi runs."; + description = lib.mdDoc "Group account where Apache NiFi runs."; }; enableHTTPS = lib.mkOption { type = lib.types.bool; default = true; - description = "Enable HTTPS protocol. Don`t use in production."; + description = lib.mdDoc "Enable HTTPS protocol. Don`t use in production."; }; listenHost = lib.mkOption { @@ -62,7 +62,7 @@ in { then "0.0.0.0" else "127.0.0.1" ''; - description = "Bind to an ip for Apache NiFi web-ui."; + description = lib.mdDoc "Bind to an ip for Apache NiFi web-ui."; }; listenPort = lib.mkOption { @@ -73,7 +73,7 @@ in { then "8443" else "8000" ''; - description = "Bind to a port for Apache NiFi web-ui."; + description = lib.mdDoc "Bind to a port for Apache NiFi web-ui."; }; proxyHost = lib.mkOption { @@ -84,7 +84,7 @@ in { then "0.0.0.0" else null ''; - description = "Allow requests from a specific host."; + description = lib.mdDoc "Allow requests from a specific host."; }; proxyPort = lib.mkOption { @@ -95,34 +95,34 @@ in { then "8443" else null ''; - description = "Allow requests from a specific port."; + description = lib.mdDoc "Allow requests from a specific port."; }; initUser = lib.mkOption { type = lib.types.nullOr lib.types.str; default = null; - description = "Initial user account for Apache NiFi. Username must be at least 4 characters."; + description = lib.mdDoc "Initial user account for Apache NiFi. Username must be at least 4 characters."; }; initPasswordFile = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null; example = "/run/keys/nifi/password-nifi"; - description = "nitial password for Apache NiFi. Password must be at least 12 characters."; + description = lib.mdDoc "nitial password for Apache NiFi. Password must be at least 12 characters."; }; initJavaHeapSize = lib.mkOption { type = lib.types.nullOr lib.types.int; default = null; example = 1024; - description = "Set the initial heap size for the JVM in MB."; + description = lib.mdDoc "Set the initial heap size for the JVM in MB."; }; maxJavaHeapSize = lib.mkOption { type = lib.types.nullOr lib.types.int; default = null; example = 2048; - description = "Set the initial heap size for the JVM in MB."; + description = lib.mdDoc "Set the initial heap size for the JVM in MB."; }; }; }; |