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/development/zammad.nix | |
parent | 52b0ad17e3727fe0c3ca028787128ede5fb86352 (diff) |
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/development/zammad.nix')
-rw-r--r-- | nixos/modules/services/development/zammad.nix | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/nixos/modules/services/development/zammad.nix b/nixos/modules/services/development/zammad.nix index d457a60718730..503f54aee2c70 100644 --- a/nixos/modules/services/development/zammad.nix +++ b/nixos/modules/services/development/zammad.nix @@ -34,13 +34,13 @@ in type = types.package; default = pkgs.zammad; defaultText = literalExpression "pkgs.zammad"; - description = "Zammad package to use."; + description = lib.mdDoc "Zammad package to use."; }; dataDir = mkOption { type = types.path; default = "/var/lib/zammad"; - description = '' + description = lib.mdDoc '' Path to a folder that will contain Zammad working directory. ''; }; @@ -49,25 +49,25 @@ in type = types.str; default = "127.0.0.1"; example = "192.168.23.42"; - description = "Host address."; + description = lib.mdDoc "Host address."; }; openPorts = mkOption { type = types.bool; default = false; - description = "Whether to open firewall ports for Zammad"; + description = lib.mdDoc "Whether to open firewall ports for Zammad"; }; port = mkOption { type = types.port; default = 3000; - description = "Web service port."; + description = lib.mdDoc "Web service port."; }; websocketPort = mkOption { type = types.port; default = 6042; - description = "Websocket service port."; + description = lib.mdDoc "Websocket service port."; }; database = { @@ -75,7 +75,7 @@ in type = types.enum [ "PostgreSQL" "MySQL" ]; default = "PostgreSQL"; example = "MySQL"; - description = "Database engine to use."; + description = lib.mdDoc "Database engine to use."; }; host = mkOption { @@ -90,7 +90,7 @@ in MySQL = "localhost"; }.''${config.services.zammad.database.type}; ''; - description = '' + description = lib.mdDoc '' Database host address. ''; }; @@ -98,13 +98,13 @@ in port = mkOption { type = types.nullOr types.port; default = null; - description = "Database port. Use <literal>null</literal> for default port."; + description = lib.mdDoc "Database port. Use `null` for default port."; }; name = mkOption { type = types.str; default = "zammad"; - description = '' + description = lib.mdDoc '' Database name. ''; }; @@ -112,22 +112,22 @@ in user = mkOption { type = types.nullOr types.str; default = "zammad"; - description = "Database user."; + description = lib.mdDoc "Database user."; }; passwordFile = mkOption { type = types.nullOr types.path; default = null; example = "/run/keys/zammad-dbpassword"; - description = '' - A file containing the password for <option>services.zammad.database.user</option>. + description = lib.mdDoc '' + A file containing the password for {option}`services.zammad.database.user`. ''; }; createLocally = mkOption { type = types.bool; default = true; - description = "Whether to create a local database automatically."; + description = lib.mdDoc "Whether to create a local database automatically."; }; settings = mkOption { |