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/syncthing.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/syncthing.nix')
-rw-r--r-- | nixos/modules/services/networking/syncthing.nix | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix index 66b85cd9d8a..373fd03223d 100644 --- a/nixos/modules/services/networking/syncthing.nix +++ b/nixos/modules/services/networking/syncthing.nix @@ -126,7 +126,7 @@ in { name = mkOption { type = types.str; default = name; - description = '' + description = lib.mdDoc '' The name of the device. ''; }; @@ -134,7 +134,7 @@ in { addresses = mkOption { type = types.listOf types.str; default = []; - description = '' + description = lib.mdDoc '' The addresses used to connect to the device. If this is left empty, dynamic configuration is attempted. ''; @@ -204,7 +204,7 @@ in { enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to share this folder. This option is useful when you want to define all folders in one place, but not every machine should share all folders. @@ -214,7 +214,7 @@ in { path = mkOption { type = types.str; default = name; - description = '' + description = lib.mdDoc '' The path to the folder which should be shared. ''; }; @@ -222,7 +222,7 @@ in { id = mkOption { type = types.str; default = name; - description = '' + description = lib.mdDoc '' The ID of the folder. Must be the same on all devices. ''; }; @@ -230,7 +230,7 @@ in { label = mkOption { type = types.str; default = name; - description = '' + description = lib.mdDoc '' The label of the folder. ''; }; @@ -311,7 +311,7 @@ in { rescanInterval = mkOption { type = types.int; default = 3600; - description = '' + description = lib.mdDoc '' How often the folder should be rescanned for changes. ''; }; @@ -319,7 +319,7 @@ in { type = mkOption { type = types.enum [ "sendreceive" "sendonly" "receiveonly" ]; default = "sendreceive"; - description = '' + description = lib.mdDoc '' Whether to only send changes for this folder, only receive them or both. ''; @@ -328,7 +328,7 @@ in { watch = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether the folder should be watched for changes by inotify. ''; }; @@ -336,7 +336,7 @@ in { watchDelay = mkOption { type = types.int; default = 10; - description = '' + description = lib.mdDoc '' The delay after an inotify event is triggered. ''; }; @@ -344,7 +344,7 @@ in { ignorePerms = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to ignore permission changes. ''; }; @@ -377,7 +377,7 @@ in { guiAddress = mkOption { type = types.str; default = "127.0.0.1:8384"; - description = '' + description = lib.mdDoc '' The address to serve the web interface at. ''; }; @@ -385,7 +385,7 @@ in { systemService = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to auto-launch Syncthing as a system service. ''; }; @@ -426,7 +426,7 @@ in { type = types.path; default = "/var/lib/syncthing"; example = "/home/yourUser"; - description = '' + description = lib.mdDoc '' The path where synchronised directories will exist. ''; }; @@ -435,7 +435,7 @@ in { cond = versionAtLeast config.system.stateVersion "19.03"; in mkOption { type = types.path; - description = '' + description = lib.mdDoc '' The path where the settings and keys will exist. ''; default = cfg.dataDir + optionalString cond "/.config/syncthing"; @@ -453,7 +453,7 @@ in { type = types.listOf types.str; default = []; example = [ "--reset-deltas" ]; - description = '' + description = lib.mdDoc '' Extra flags passed to the syncthing command in the service definition. ''; }; @@ -462,7 +462,7 @@ in { type = types.bool; default = false; example = true; - description = '' + description = lib.mdDoc '' Whether to open the default ports in the firewall: TCP/UDP 22000 for transfers and UDP 21027 for discovery. @@ -477,7 +477,7 @@ in { type = types.package; default = pkgs.syncthing; defaultText = literalExpression "pkgs.syncthing"; - description = '' + description = lib.mdDoc '' The Syncthing package to use. ''; }; |