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/web-apps/tt-rss.nix | 86 +++++++++++++++--------------- 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'nixos/modules/services/web-apps/tt-rss.nix') diff --git a/nixos/modules/services/web-apps/tt-rss.nix b/nixos/modules/services/web-apps/tt-rss.nix index c441a2a7764..f105b0aa3f7 100644 --- a/nixos/modules/services/web-apps/tt-rss.nix +++ b/nixos/modules/services/web-apps/tt-rss.nix @@ -126,7 +126,7 @@ let root = mkOption { type = types.path; default = "/var/lib/tt-rss"; - description = '' + description = lib.mdDoc '' Root of the application. ''; }; @@ -134,7 +134,7 @@ let user = mkOption { type = types.str; default = "tt_rss"; - description = '' + description = lib.mdDoc '' User account under which both the update daemon and the web-application run. ''; }; @@ -142,7 +142,7 @@ let pool = mkOption { type = types.str; default = "${poolName}"; - description = '' + description = lib.mdDoc '' Name of existing phpfpm pool that is used to run web-application. If not specified a pool will be created automatically with default values. @@ -152,7 +152,7 @@ let virtualHost = mkOption { type = types.nullOr types.str; default = "tt-rss"; - description = '' + description = lib.mdDoc '' Name of the nginx virtualhost to use and setup. If null, do not setup any virtualhost. ''; }; @@ -161,7 +161,7 @@ let type = mkOption { type = types.enum ["pgsql" "mysql"]; default = "pgsql"; - description = '' + description = lib.mdDoc '' Database to store feeds. Supported are pgsql and mysql. ''; }; @@ -169,7 +169,7 @@ let host = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' Host of the database. Leave null to use Unix domain socket. ''; }; @@ -177,7 +177,7 @@ let name = mkOption { type = types.str; default = "tt_rss"; - description = '' + description = lib.mdDoc '' Name of the existing database. ''; }; @@ -185,7 +185,7 @@ let user = mkOption { type = types.str; default = "tt_rss"; - description = '' + description = lib.mdDoc '' The database user. The user must exist and has access to the specified database. ''; @@ -194,7 +194,7 @@ let password = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' The database user's password. ''; }; @@ -202,7 +202,7 @@ let passwordFile = mkOption { type = types.nullOr types.str; default = null; - description = '' + description = lib.mdDoc '' The database user's password. ''; }; @@ -210,7 +210,7 @@ let port = mkOption { type = types.nullOr types.int; default = null; - description = '' + description = lib.mdDoc '' The database's port. If not set, the default ports will be provided (5432 and 3306 for pgsql and mysql respectively). ''; @@ -219,7 +219,7 @@ let createLocally = mkOption { type = types.bool; default = true; - description = "Create the database and database user locally."; + description = lib.mdDoc "Create the database and database user locally."; }; }; @@ -227,7 +227,7 @@ let autoCreate = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Allow authentication modules to auto-create users in tt-rss internal database when authenticated successfully. ''; @@ -236,7 +236,7 @@ let autoLogin = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Automatically login user on remote or other kind of externally supplied authentication, otherwise redirect to login form as normal. If set to true, users won't be able to set application language @@ -249,7 +249,7 @@ let hub = mkOption { type = types.str; default = ""; - description = '' + description = lib.mdDoc '' URL to a PubSubHubbub-compatible hub server. If defined, "Published articles" generated feed would automatically become PUSH-enabled. ''; @@ -258,7 +258,7 @@ let enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Enable client PubSubHubbub support in tt-rss. When disabled, tt-rss won't try to subscribe to PUSH feed updates. ''; @@ -269,7 +269,7 @@ let server = mkOption { type = types.str; default = "localhost:9312"; - description = '' + description = lib.mdDoc '' Hostname:port combination for the Sphinx server. ''; }; @@ -277,7 +277,7 @@ let index = mkOption { type = types.listOf types.str; default = ["ttrss" "delta"]; - description = '' + description = lib.mdDoc '' Index names in Sphinx configuration. Example configuration files are available on tt-rss wiki. ''; @@ -288,7 +288,7 @@ let enable = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Allow users to register themselves. Please be aware that allowing random people to access your tt-rss installation is a security risk and potentially might lead to data loss or server exploit. Disabled @@ -299,7 +299,7 @@ let notifyAddress = mkOption { type = types.str; default = ""; - description = '' + description = lib.mdDoc '' Email address to send new user notifications to. ''; }; @@ -307,7 +307,7 @@ let maxUsers = mkOption { type = types.int; default = 0; - description = '' + description = lib.mdDoc '' Maximum amount of users which will be allowed to register on this system. 0 - no limit. ''; @@ -319,7 +319,7 @@ let type = types.str; default = ""; example = "localhost:25"; - description = '' + description = lib.mdDoc '' Hostname:port combination to send outgoing mail. Blank - use system MTA. ''; @@ -328,7 +328,7 @@ let login = mkOption { type = types.str; default = ""; - description = '' + description = lib.mdDoc '' SMTP authentication login used when sending outgoing mail. ''; }; @@ -336,7 +336,7 @@ let password = mkOption { type = types.str; default = ""; - description = '' + description = lib.mdDoc '' SMTP authentication password used when sending outgoing mail. ''; }; @@ -344,7 +344,7 @@ let security = mkOption { type = types.enum ["" "ssl" "tls"]; default = ""; - description = '' + description = lib.mdDoc '' Used to select a secure SMTP connection. Allowed values: ssl, tls, or empty. ''; @@ -353,7 +353,7 @@ let fromName = mkOption { type = types.str; default = "Tiny Tiny RSS"; - description = '' + description = lib.mdDoc '' Name for sending outgoing mail. This applies to password reset notifications, digest emails and any other mail. ''; @@ -362,7 +362,7 @@ let fromAddress = mkOption { type = types.str; default = ""; - description = '' + description = lib.mdDoc '' Address for sending outgoing mail. This applies to password reset notifications, digest emails and any other mail. ''; @@ -371,7 +371,7 @@ let digestSubject = mkOption { type = types.str; default = "[tt-rss] New headlines for last 24 hours"; - description = '' + description = lib.mdDoc '' Subject line for email digests. ''; }; @@ -380,7 +380,7 @@ let sessionCookieLifetime = mkOption { type = types.int; default = 86400; - description = '' + description = lib.mdDoc '' Default lifetime of a session (e.g. login) cookie. In seconds, 0 means cookie will be deleted when browser closes. ''; @@ -388,7 +388,7 @@ let selfUrlPath = mkOption { type = types.str; - description = '' + description = lib.mdDoc '' Full URL of your tt-rss installation. This should be set to the location of tt-rss directory, e.g. http://example.org/tt-rss/ You need to set this option correctly otherwise several features @@ -400,7 +400,7 @@ let feedCryptKey = mkOption { type = types.str; default = ""; - description = '' + description = lib.mdDoc '' Key used for encryption of passwords for password-protected feeds in the database. A string of 24 random characters. If left blank, encryption is not used. Requires mcrypt functions. @@ -413,7 +413,7 @@ let type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Operate in single user mode, disables all functionality related to multiple users and authentication. Enabling this assumes you have your tt-rss directory protected by other means (e.g. http auth). @@ -423,7 +423,7 @@ let simpleUpdateMode = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Enables fallback update mode where tt-rss tries to update feeds in background while tt-rss is open in your browser. If you don't have a lot of feeds and don't want to or can't run @@ -437,7 +437,7 @@ let forceArticlePurge = mkOption { type = types.int; default = 0; - description = '' + description = lib.mdDoc '' When this option is not 0, users ability to control feed purging intervals is disabled and all articles (which are not starred) older than this amount of days are purged. @@ -447,7 +447,7 @@ let enableGZipOutput = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Selectively gzip output to improve wire performance. This requires PHP Zlib extension on the server. Enabling this can break tt-rss in several httpd/php configurations, @@ -459,7 +459,7 @@ let plugins = mkOption { type = types.listOf types.str; default = ["auth_internal" "note"]; - description = '' + description = lib.mdDoc '' List of plugins to load automatically for all users. System plugins have to be specified here. Please enable at least one authentication plugin here (auth_*). @@ -473,27 +473,27 @@ let pluginPackages = mkOption { type = types.listOf types.package; default = []; - description = '' + description = lib.mdDoc '' List of plugins to install. The list elements are expected to be derivations. All elements in this derivation are automatically - copied to the plugins.local directory. + copied to the `plugins.local` directory. ''; }; themePackages = mkOption { type = types.listOf types.package; default = []; - description = '' + description = lib.mdDoc '' List of themes to install. The list elements are expected to be derivations. All elements in this derivation are automatically - copied to the themes.local directory. + copied to the `themes.local` directory. ''; }; logDestination = mkOption { type = types.enum ["" "sql" "syslog"]; default = "sql"; - description = '' + description = lib.mdDoc '' Log destination to use. Possible values: sql (uses internal logging you can read in Preferences -> System), syslog - logs to system log. Setting this to blank uses PHP logging (usually to http server @@ -504,8 +504,8 @@ let extraConfig = mkOption { type = types.lines; default = ""; - description = '' - Additional lines to append to config.php. + description = lib.mdDoc '' + Additional lines to append to `config.php`. ''; }; }; -- cgit 1.4.1