From 2e751c0772b9d48ff6923569adfa661b030ab6a2 Mon Sep 17 00:00:00 2001 From: pennae Date: Thu, 28 Jul 2022 23:19:15 +0200 Subject: 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 and , so any option using such tags will not be converted at all. --- nixos/modules/services/web-servers/jboss/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'nixos/modules/services/web-servers/jboss/default.nix') diff --git a/nixos/modules/services/web-servers/jboss/default.nix b/nixos/modules/services/web-servers/jboss/default.nix index d243e0f3f1b..05b354d567f 100644 --- a/nixos/modules/services/web-servers/jboss/default.nix +++ b/nixos/modules/services/web-servers/jboss/default.nix @@ -26,49 +26,49 @@ in enable = mkOption { type = types.bool; default = false; - description = "Whether to enable JBoss. WARNING : this package is outdated and is known to have vulnerabilities."; + description = lib.mdDoc "Whether to enable JBoss. WARNING : this package is outdated and is known to have vulnerabilities."; }; tempDir = mkOption { default = "/tmp"; type = types.str; - description = "Location where JBoss stores its temp files"; + description = lib.mdDoc "Location where JBoss stores its temp files"; }; logDir = mkOption { default = "/var/log/jboss"; type = types.str; - description = "Location of the logfile directory of JBoss"; + description = lib.mdDoc "Location of the logfile directory of JBoss"; }; serverDir = mkOption { - description = "Location of the server instance files"; + description = lib.mdDoc "Location of the server instance files"; default = "/var/jboss/server"; type = types.str; }; deployDir = mkOption { - description = "Location of the deployment files"; + description = lib.mdDoc "Location of the deployment files"; default = "/nix/var/nix/profiles/default/server/default/deploy/"; type = types.str; }; libUrl = mkOption { default = "file:///nix/var/nix/profiles/default/server/default/lib"; - description = "Location where the shared library JARs are stored"; + description = lib.mdDoc "Location where the shared library JARs are stored"; type = types.str; }; user = mkOption { default = "nobody"; - description = "User account under which jboss runs."; + description = lib.mdDoc "User account under which jboss runs."; type = types.str; }; useJK = mkOption { type = types.bool; default = false; - description = "Whether to use to connector to the Apache HTTP server"; + description = lib.mdDoc "Whether to use to connector to the Apache HTTP server"; }; }; -- cgit 1.4.1