From 2e751c0772b9d48ff6923569adfa661b030ab6a2 Mon Sep 17 00:00:00 2001 From: pennae Date: Thu, 28 Jul 2022 23:19:15 +0200 Subject: 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 and , so any option using such tags will not be converted at all. --- nixos/modules/services/printing/cupsd.nix | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'nixos/modules/services/printing') diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix index 53091d8e2a0e..8f1c3d9c525a 100644 --- a/nixos/modules/services/printing/cupsd.nix +++ b/nixos/modules/services/printing/cupsd.nix @@ -129,7 +129,7 @@ in enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Whether to enable printing support through the CUPS daemon. ''; }; @@ -137,7 +137,7 @@ in startWhenNeeded = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' If set, CUPS is socket-activated; that is, instead of having it permanently running as a daemon, systemd will start it on the first incoming connection. @@ -148,7 +148,7 @@ in type = types.listOf types.str; default = [ "localhost:631" ]; example = [ "*:631" ]; - description = '' + description = lib.mdDoc '' A list of addresses and ports on which to listen. ''; }; @@ -158,7 +158,7 @@ in default = [ "localhost" ]; example = [ "all" ]; apply = concatMapStringsSep "\n" (x: "Allow ${x}"); - description = '' + description = lib.mdDoc '' From which hosts to allow unconditional access. ''; }; @@ -176,7 +176,7 @@ in defaultShared = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Specifies whether local printers are shared by default. ''; }; @@ -184,7 +184,7 @@ in browsing = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Specifies whether shared printers are advertised. ''; }; @@ -192,7 +192,7 @@ in webInterface = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Specifies whether the web interface is enabled. ''; }; @@ -201,7 +201,7 @@ in type = types.str; default = "info"; example = "debug"; - description = '' + description = lib.mdDoc '' Specifies the cupsd logging verbosity. ''; }; @@ -209,9 +209,9 @@ in extraFilesConf = mkOption { type = types.lines; default = ""; - description = '' + description = lib.mdDoc '' Extra contents of the configuration file of the CUPS daemon - (cups-files.conf). + ({file}`cups-files.conf`). ''; }; @@ -223,9 +223,9 @@ in BrowsePoll cups.example.com MaxCopies 42 ''; - description = '' + description = lib.mdDoc '' Extra contents of the configuration file of the CUPS daemon - (cupsd.conf). + ({file}`cupsd.conf`). ''; }; @@ -237,9 +237,9 @@ in ServerName server.example.com Encryption Never ''; - description = '' + description = lib.mdDoc '' The contents of the client configuration. - (client.conf) + ({file}`client.conf`) ''; }; @@ -250,9 +250,9 @@ in '' BrowsePoll cups.example.com ''; - description = '' + description = lib.mdDoc '' The contents of the configuration. file of the CUPS Browsed daemon - (cups-browsed.conf) + ({file}`cups-browsed.conf`) ''; }; @@ -261,8 +261,8 @@ in default = '' Address @LOCAL ''; - description = '' - The contents of /etc/cups/snmp.conf. See "man + description = lib.mdDoc '' + The contents of {file}`/etc/cups/snmp.conf`. See "man cups-snmp.conf" for a complete description. ''; }; @@ -271,12 +271,12 @@ in type = types.listOf types.path; default = []; example = literalExpression "with pkgs; [ gutenprint hplip splix ]"; - description = '' + description = lib.mdDoc '' CUPS drivers to use. Drivers provided by CUPS, cups-filters, Ghostscript and Samba are added unconditionally. If this list contains Gutenprint (i.e. a derivation with - meta.isGutenprint = true) the PPD files in - /var/lib/cups/ppd will be updated automatically + `meta.isGutenprint = true`) the PPD files in + {file}`/var/lib/cups/ppd` will be updated automatically to avoid errors due to incompatible versions. ''; }; @@ -285,7 +285,7 @@ in type = types.path; default = "/tmp"; example = "/tmp/cups"; - description = '' + description = lib.mdDoc '' CUPSd temporary directory. ''; }; -- cgit 1.4.1