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/networking/consul.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/networking/consul.nix')
-rw-r--r-- | nixos/modules/services/networking/consul.nix | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/nixos/modules/services/networking/consul.nix b/nixos/modules/services/networking/consul.nix index cb53cc01f52..16f1b5eec87 100644 --- a/nixos/modules/services/networking/consul.nix +++ b/nixos/modules/services/networking/consul.nix @@ -28,7 +28,7 @@ in enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Enables the consul daemon. ''; }; @@ -37,7 +37,7 @@ in type = types.package; default = pkgs.consul; defaultText = literalExpression "pkgs.consul"; - description = '' + description = lib.mdDoc '' The package used for the Consul agent and CLI. ''; }; @@ -46,7 +46,7 @@ in webUi = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Enables the web interface on the consul http port. ''; }; @@ -54,7 +54,7 @@ in leaveOnStop = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' If enabled, causes a leave action to be sent when closing consul. This allows a clean termination of the node, but permanently removes it from the cluster. You probably don't want this option unless you @@ -68,7 +68,7 @@ in advertise = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' The name of the interface to pull the advertise_addr from. ''; }; @@ -76,7 +76,7 @@ in bind = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' The name of the interface to pull the bind_addr from. ''; }; @@ -85,7 +85,7 @@ in forceAddrFamily = mkOption { type = types.enum [ "any" "ipv4" "ipv6" ]; default = "any"; - description = '' + description = lib.mdDoc '' Whether to bind ipv4/ipv6 or both kind of addresses. ''; }; @@ -93,7 +93,7 @@ in forceIpv4 = mkOption { type = types.nullOr types.bool; default = null; - description = '' + description = lib.mdDoc '' Deprecated: Use consul.forceAddrFamily instead. Whether we should force the interfaces to only pull ipv4 addresses. ''; @@ -102,7 +102,7 @@ in dropPrivileges = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether the consul agent should be run as a non-root consul user. ''; }; @@ -110,7 +110,7 @@ in extraConfig = mkOption { default = { }; type = types.attrsOf types.anything; - description = '' + description = lib.mdDoc '' Extra configuration options which are serialized to json and added to the config.json file. ''; @@ -119,7 +119,7 @@ in extraConfigFiles = mkOption { default = [ ]; type = types.listOf types.str; - description = '' + description = lib.mdDoc '' Additional configuration files to pass to consul NOTE: These will not trigger the service to be restarted when altered. ''; @@ -129,32 +129,32 @@ in enable = mkEnableOption "consul-alerts"; package = mkOption { - description = "Package to use for consul-alerts."; + description = lib.mdDoc "Package to use for consul-alerts."; default = pkgs.consul-alerts; defaultText = literalExpression "pkgs.consul-alerts"; type = types.package; }; listenAddr = mkOption { - description = "Api listening address."; + description = lib.mdDoc "Api listening address."; default = "localhost:9000"; type = types.str; }; consulAddr = mkOption { - description = "Consul api listening adddress"; + description = lib.mdDoc "Consul api listening adddress"; default = "localhost:8500"; type = types.str; }; watchChecks = mkOption { - description = "Whether to enable check watcher."; + description = lib.mdDoc "Whether to enable check watcher."; default = true; type = types.bool; }; watchEvents = mkOption { - description = "Whether to enable event watcher."; + description = lib.mdDoc "Whether to enable event watcher."; default = true; type = types.bool; }; |