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/torrent/transmission.nix | |
parent | 52b0ad17e3727fe0c3ca028787128ede5fb86352 (diff) | |
download | nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.gz nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.bz2 nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.lz nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.xz nixpkgs-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.zst nixpkgs-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/torrent/transmission.nix')
-rw-r--r-- | nixos/modules/services/torrent/transmission.nix | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index d12d8aa2398..9777964386c 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -34,12 +34,12 @@ in accessible to users in the "transmission" group''; settings = mkOption { - description = '' + description = lib.mdDoc '' Settings whose options overwrite fields in - <literal>.config/transmission-daemon/settings.json</literal> + `.config/transmission-daemon/settings.json` (each time the service starts). - See <link xlink:href="https://github.com/transmission/transmission/wiki/Editing-Configuration-Files">Transmission's Wiki</link> + See [Transmission's Wiki](https://github.com/transmission/transmission/wiki/Editing-Configuration-Files) for documentation of settings not explicitely covered by this module. ''; default = {}; @@ -49,7 +49,7 @@ in type = types.path; default = "${cfg.home}/${downloadsDir}"; defaultText = literalExpression ''"''${config.${opt.home}}/${downloadsDir}"''; - description = "Directory where to download torrents."; + description = lib.mdDoc "Directory where to download torrents."; }; options.incomplete-dir = mkOption { type = types.path; @@ -72,12 +72,12 @@ in options.message-level = mkOption { type = types.ints.between 0 3; default = 2; - description = "Set verbosity of transmission messages."; + description = lib.mdDoc "Set verbosity of transmission messages."; }; options.peer-port = mkOption { type = types.port; default = 51413; - description = "The peer port to listen for incoming connections."; + description = lib.mdDoc "The peer port to listen for incoming connections."; }; options.peer-port-random-high = mkOption { type = types.port; @@ -98,7 +98,7 @@ in options.peer-port-random-on-start = mkOption { type = types.bool; default = false; - description = "Randomize the peer port."; + description = lib.mdDoc "Randomize the peer port."; }; options.rpc-bind-address = mkOption { type = types.str; @@ -112,7 +112,7 @@ in options.rpc-port = mkOption { type = types.port; default = 9091; - description = "The RPC port to listen to."; + description = lib.mdDoc "The RPC port to listen to."; }; options.script-torrent-done-enabled = mkOption { type = types.bool; @@ -126,12 +126,12 @@ in options.script-torrent-done-filename = mkOption { type = types.nullOr types.path; default = null; - description = "Executable to be run at torrent completion."; + description = lib.mdDoc "Executable to be run at torrent completion."; }; options.umask = mkOption { type = types.int; default = 2; - description = '' + description = lib.mdDoc '' Sets transmission's file mode creation mask. See the umask(2) manpage for more information. Users who want their saved torrents to be world-writable @@ -143,15 +143,15 @@ in options.utp-enabled = mkOption { type = types.bool; default = true; - description = '' - Whether to enable <link xlink:href="http://en.wikipedia.org/wiki/Micro_Transport_Protocol">Micro Transport Protocol (µTP)</link>. + description = lib.mdDoc '' + Whether to enable [Micro Transport Protocol (µTP)](http://en.wikipedia.org/wiki/Micro_Transport_Protocol). ''; }; options.watch-dir = mkOption { type = types.path; default = "${cfg.home}/${watchDir}"; defaultText = literalExpression ''"''${config.${opt.home}}/${watchDir}"''; - description = "Watch a directory for torrent files and add them to transmission."; + description = lib.mdDoc "Watch a directory for torrent files and add them to transmission."; }; options.watch-dir-enabled = mkOption { type = types.bool; @@ -200,13 +200,13 @@ in user = mkOption { type = types.str; default = "transmission"; - description = "User account under which Transmission runs."; + description = lib.mdDoc "User account under which Transmission runs."; }; group = mkOption { type = types.str; default = "transmission"; - description = "Group account under which Transmission runs."; + description = lib.mdDoc "Group account under which Transmission runs."; }; credentialsFile = mkOption { @@ -224,7 +224,7 @@ in type = types.listOf types.str; default = []; example = [ "--log-debug" ]; - description = '' + description = lib.mdDoc '' Extra flags passed to the transmission command in the service definition. ''; }; |