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/games/minecraft-server.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/games/minecraft-server.nix')
-rw-r--r-- | nixos/modules/services/games/minecraft-server.nix | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/nixos/modules/services/games/minecraft-server.nix b/nixos/modules/services/games/minecraft-server.nix index 309fe43eaf4c4..77f92ab97db74 100644 --- a/nixos/modules/services/games/minecraft-server.nix +++ b/nixos/modules/services/games/minecraft-server.nix @@ -54,21 +54,21 @@ in { enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' If enabled, start a Minecraft Server. The server data will be loaded from and saved to - <option>services.minecraft-server.dataDir</option>. + {option}`services.minecraft-server.dataDir`. ''; }; declarative = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to use a declarative Minecraft server configuration. - Only if set to <literal>true</literal>, the options - <option>services.minecraft-server.whitelist</option> and - <option>services.minecraft-server.serverProperties</option> will be + Only if set to `true`, the options + {option}`services.minecraft-server.whitelist` and + {option}`services.minecraft-server.serverProperties` will be applied. ''; }; @@ -76,18 +76,18 @@ in { eula = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether you agree to - <link xlink:href="https://account.mojang.com/documents/minecraft_eula"> - Mojangs EULA</link>. This option must be set to - <literal>true</literal> to run Minecraft server. + [ + Mojangs EULA](https://account.mojang.com/documents/minecraft_eula). This option must be set to + `true` to run Minecraft server. ''; }; dataDir = mkOption { type = types.path; default = "/var/lib/minecraft"; - description = '' + description = lib.mdDoc '' Directory to store Minecraft database and other state/data files. ''; }; @@ -95,7 +95,7 @@ in { openFirewall = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to open ports in the firewall for the server. ''; }; @@ -108,14 +108,14 @@ in { }; in types.attrsOf minecraftUUID; default = {}; - description = '' + description = lib.mdDoc '' Whitelisted players, only has an effect when - <option>services.minecraft-server.declarative</option> is - <literal>true</literal> and the whitelist is enabled - via <option>services.minecraft-server.serverProperties</option> by - setting <literal>white-list</literal> to <literal>true</literal>. + {option}`services.minecraft-server.declarative` is + `true` and the whitelist is enabled + via {option}`services.minecraft-server.serverProperties` by + setting `white-list` to `true`. This is a mapping from Minecraft usernames to UUIDs. - You can use <link xlink:href="https://mcuuid.net/"/> to get a + You can use <https://mcuuid.net/> to get a Minecraft UUID for a username. ''; example = literalExpression '' @@ -141,11 +141,11 @@ in { "rcon.password" = "hunter2"; } ''; - description = '' + description = lib.mdDoc '' Minecraft server properties for the server.properties file. Only has - an effect when <option>services.minecraft-server.declarative</option> - is set to <literal>true</literal>. See - <link xlink:href="https://minecraft.gamepedia.com/Server.properties#Java_Edition_3"/> + an effect when {option}`services.minecraft-server.declarative` + is set to `true`. See + <https://minecraft.gamepedia.com/Server.properties#Java_Edition_3> for documentation on these values. ''; }; @@ -155,7 +155,7 @@ in { default = pkgs.minecraft-server; defaultText = literalExpression "pkgs.minecraft-server"; example = literalExpression "pkgs.minecraft-server_1_12_2"; - description = "Version of minecraft-server to run."; + description = lib.mdDoc "Version of minecraft-server to run."; }; jvmOpts = mkOption { @@ -165,7 +165,7 @@ in { example = "-Xms4092M -Xmx4092M -XX:+UseG1GC -XX:+CMSIncrementalPacing " + "-XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 " + "-XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10"; - description = "JVM options for the Minecraft server."; + description = lib.mdDoc "JVM options for the Minecraft server."; }; }; }; |