summary refs log tree commit diff
path: root/nixos/modules/services/databases
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-08-02 06:02:34 +0000
committerGitHub <noreply@github.com>2022-08-02 06:02:34 +0000
commit0f0010fda33b7082197495df475d02f64d7e5050 (patch)
treedeee10eaf5f1b24afc73804ae70aec24e6fcf2ce /nixos/modules/services/databases
parentad090ff8671dcb957c0bafef4eba9d527d90d957 (diff)
parentd2042f91c1ad953825556be3ec2e53cf9a91fc77 (diff)
Merge master into staging-next
Diffstat (limited to 'nixos/modules/services/databases')
-rw-r--r--nixos/modules/services/databases/aerospike.nix8
-rw-r--r--nixos/modules/services/databases/cassandra.nix6
-rw-r--r--nixos/modules/services/databases/clickhouse.nix2
-rw-r--r--nixos/modules/services/databases/cockroachdb.nix36
-rw-r--r--nixos/modules/services/databases/couchdb.nix30
-rw-r--r--nixos/modules/services/databases/dgraph.nix10
-rw-r--r--nixos/modules/services/databases/dragonflydb.nix26
-rw-r--r--nixos/modules/services/databases/firebird.nix6
-rw-r--r--nixos/modules/services/databases/foundationdb.nix74
-rw-r--r--nixos/modules/services/databases/hbase.nix16
-rw-r--r--nixos/modules/services/databases/influxdb.nix12
-rw-r--r--nixos/modules/services/databases/influxdb2.nix4
-rw-r--r--nixos/modules/services/databases/memcached.nix12
-rw-r--r--nixos/modules/services/databases/monetdb.nix12
-rw-r--r--nixos/modules/services/databases/mongodb.nix20
-rw-r--r--nixos/modules/services/databases/mysql.nix32
-rw-r--r--nixos/modules/services/databases/neo4j.nix82
-rw-r--r--nixos/modules/services/databases/openldap.nix18
-rw-r--r--nixos/modules/services/databases/opentsdb.nix12
-rw-r--r--nixos/modules/services/databases/pgmanage.nix26
-rw-r--r--nixos/modules/services/databases/postgresql.nix36
-rw-r--r--nixos/modules/services/databases/redis.nix52
-rw-r--r--nixos/modules/services/databases/victoriametrics.nix6
23 files changed, 269 insertions, 269 deletions
diff --git a/nixos/modules/services/databases/aerospike.nix b/nixos/modules/services/databases/aerospike.nix
index 8109762aea788..9ffedaebf6676 100644
--- a/nixos/modules/services/databases/aerospike.nix
+++ b/nixos/modules/services/databases/aerospike.nix
@@ -45,13 +45,13 @@ in
         default = pkgs.aerospike;
         defaultText = literalExpression "pkgs.aerospike";
         type = types.package;
-        description = "Which Aerospike derivation to use";
+        description = lib.mdDoc "Which Aerospike derivation to use";
       };
 
       workDir = mkOption {
         type = types.str;
         default = "/var/lib/aerospike";
-        description = "Location where Aerospike stores its files";
+        description = lib.mdDoc "Location where Aerospike stores its files";
       };
 
       networkConfig = mkOption {
@@ -80,7 +80,7 @@ in
             port 3003
           }
         '';
-        description = "network section of configuration file";
+        description = lib.mdDoc "network section of configuration file";
       };
 
       extraConfig = mkOption {
@@ -94,7 +94,7 @@ in
             storage-engine memory
           }
         '';
-        description = "Extra configuration";
+        description = lib.mdDoc "Extra configuration";
       };
     };
 
diff --git a/nixos/modules/services/databases/cassandra.nix b/nixos/modules/services/databases/cassandra.nix
index b457e69babaad..38db1d2e9f719 100644
--- a/nixos/modules/services/databases/cassandra.nix
+++ b/nixos/modules/services/databases/cassandra.nix
@@ -422,11 +422,11 @@ in
         options = {
           username = mkOption {
             type = types.str;
-            description = "Username for JMX";
+            description = lib.mdDoc "Username for JMX";
           };
           password = mkOption {
             type = types.str;
-            description = "Password for JMX";
+            description = lib.mdDoc "Password for JMX";
           };
         };
       });
@@ -440,7 +440,7 @@ in
         else null;
       defaultText = literalMD ''generated configuration file if version is at least 3.11, otherwise `null`'';
       example = "/var/lib/cassandra/jmx.password";
-      description = ''
+      description = lib.mdDoc ''
         Specify your own jmx roles file.
 
         Make sure the permissions forbid "others" from reading the file if
diff --git a/nixos/modules/services/databases/clickhouse.nix b/nixos/modules/services/databases/clickhouse.nix
index 3a161d56107eb..53637f4171c23 100644
--- a/nixos/modules/services/databases/clickhouse.nix
+++ b/nixos/modules/services/databases/clickhouse.nix
@@ -17,7 +17,7 @@ with lib;
         type = types.package;
         default = pkgs.clickhouse;
         defaultText = "pkgs.clickhouse";
-        description = ''
+        description = lib.mdDoc ''
           ClickHouse package to use.
         '';
       };
diff --git a/nixos/modules/services/databases/cockroachdb.nix b/nixos/modules/services/databases/cockroachdb.nix
index 9a7aebe4f6ae9..b8d7321d00f56 100644
--- a/nixos/modules/services/databases/cockroachdb.nix
+++ b/nixos/modules/services/databases/cockroachdb.nix
@@ -35,13 +35,13 @@ let
     address = mkOption {
       type = types.str;
       default = "localhost";
-      description = "Address to bind to for ${descr}";
+      description = lib.mdDoc "Address to bind to for ${descr}";
     };
 
     port = mkOption {
       type = types.port;
       default = defaultPort;
-      description = "Port to bind to for ${descr}";
+      description = lib.mdDoc "Port to bind to for ${descr}";
     };
   };
 in
@@ -80,50 +80,50 @@ in
       join = mkOption {
         type = types.nullOr types.str;
         default = null;
-        description = "The addresses for connecting the node to a cluster.";
+        description = lib.mdDoc "The addresses for connecting the node to a cluster.";
       };
 
       insecure = mkOption {
         type = types.bool;
         default = false;
-        description = "Run in insecure mode.";
+        description = lib.mdDoc "Run in insecure mode.";
       };
 
       certsDir = mkOption {
         type = types.nullOr types.path;
         default = null;
-        description = "The path to the certificate directory.";
+        description = lib.mdDoc "The path to the certificate directory.";
       };
 
       user = mkOption {
         type = types.str;
         default = "cockroachdb";
-        description = "User account under which CockroachDB runs";
+        description = lib.mdDoc "User account under which CockroachDB runs";
       };
 
       group = mkOption {
         type = types.str;
         default = "cockroachdb";
-        description = "User account under which CockroachDB runs";
+        description = lib.mdDoc "User account under which CockroachDB runs";
       };
 
       openPorts = mkOption {
         type = types.bool;
         default = false;
-        description = "Open firewall ports for cluster communication by default";
+        description = lib.mdDoc "Open firewall ports for cluster communication by default";
       };
 
       cache = mkOption {
         type = types.str;
         default = "25%";
-        description = ''
+        description = lib.mdDoc ''
           The total size for caches.
 
           This can be a percentage, expressed with a fraction sign or as a
           decimal-point number, or any bytes-based unit. For example,
-          <literal>"25%"</literal>, <literal>"0.25"</literal> both represent
+          `"25%"`, `"0.25"` both represent
           25% of the available system memory. The values
-          <literal>"1000000000"</literal> and <literal>"1GB"</literal> both
+          `"1000000000"` and `"1GB"` both
           represent 1 gigabyte of memory.
 
         '';
@@ -132,15 +132,15 @@ in
       maxSqlMemory = mkOption {
         type = types.str;
         default = "25%";
-        description = ''
+        description = lib.mdDoc ''
           The maximum in-memory storage capacity available to store temporary
           data for SQL queries.
 
           This can be a percentage, expressed with a fraction sign or as a
           decimal-point number, or any bytes-based unit. For example,
-          <literal>"25%"</literal>, <literal>"0.25"</literal> both represent
+          `"25%"`, `"0.25"` both represent
           25% of the available system memory. The values
-          <literal>"1000000000"</literal> and <literal>"1GB"</literal> both
+          `"1000000000"` and `"1GB"` both
           represent 1 gigabyte of memory.
         '';
       };
@@ -149,7 +149,7 @@ in
         type = types.package;
         default = pkgs.cockroachdb;
         defaultText = literalExpression "pkgs.cockroachdb";
-        description = ''
+        description = lib.mdDoc ''
           The CockroachDB derivation to use for running the service.
 
           This would primarily be useful to enable Enterprise Edition features
@@ -162,9 +162,9 @@ in
         type = types.listOf types.str;
         default = [];
         example = [ "--advertise-addr" "[fe80::f6f2:::]" ];
-        description = ''
-          Extra CLI arguments passed to <command>cockroach start</command>.
-          For the full list of supported argumemnts, check <link xlink:href="https://www.cockroachlabs.com/docs/stable/cockroach-start.html#flags"/>
+        description = lib.mdDoc ''
+          Extra CLI arguments passed to {command}`cockroach start`.
+          For the full list of supported argumemnts, check <https://www.cockroachlabs.com/docs/stable/cockroach-start.html#flags>
         '';
       };
     };
diff --git a/nixos/modules/services/databases/couchdb.nix b/nixos/modules/services/databases/couchdb.nix
index 39d1ead28fc0c..2a570d09a2c47 100644
--- a/nixos/modules/services/databases/couchdb.nix
+++ b/nixos/modules/services/databases/couchdb.nix
@@ -37,7 +37,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to run CouchDB Server.
         '';
       };
@@ -46,7 +46,7 @@ in {
         type = types.package;
         default = pkgs.couchdb3;
         defaultText = literalExpression "pkgs.couchdb3";
-        description = ''
+        description = lib.mdDoc ''
           CouchDB package to use.
         '';
       };
@@ -54,7 +54,7 @@ in {
       adminUser = mkOption {
         type = types.str;
         default = "admin";
-        description = ''
+        description = lib.mdDoc ''
           Couchdb (i.e. fauxton) account with permission for all dbs and
           tasks.
         '';
@@ -63,7 +63,7 @@ in {
       adminPass = mkOption {
         type = types.nullOr types.str;
         default = null;
-        description = ''
+        description = lib.mdDoc ''
           Couchdb (i.e. fauxton) account with permission for all dbs and
           tasks.
         '';
@@ -72,7 +72,7 @@ in {
       user = mkOption {
         type = types.str;
         default = "couchdb";
-        description = ''
+        description = lib.mdDoc ''
           User account under which couchdb runs.
         '';
       };
@@ -80,7 +80,7 @@ in {
       group = mkOption {
         type = types.str;
         default = "couchdb";
-        description = ''
+        description = lib.mdDoc ''
           Group account under which couchdb runs.
         '';
       };
@@ -90,7 +90,7 @@ in {
       databaseDir = mkOption {
         type = types.path;
         default = "/var/lib/couchdb";
-        description = ''
+        description = lib.mdDoc ''
           Specifies location of CouchDB database files (*.couch named). This
           location should be writable and readable for the user the CouchDB
           service runs as (couchdb by default).
@@ -100,7 +100,7 @@ in {
       uriFile = mkOption {
         type = types.path;
         default = "/run/couchdb/couchdb.uri";
-        description = ''
+        description = lib.mdDoc ''
           This file contains the full URI that can be used to access this
           instance of CouchDB. It is used to help discover the port CouchDB is
           running on (if it was set to 0 (e.g. automatically assigned any free
@@ -112,7 +112,7 @@ in {
       viewIndexDir = mkOption {
         type = types.path;
         default = "/var/lib/couchdb";
-        description = ''
+        description = lib.mdDoc ''
           Specifies location of CouchDB view index files. This location should
           be writable and readable for the user that runs the CouchDB service
           (couchdb by default).
@@ -122,7 +122,7 @@ in {
       bindAddress = mkOption {
         type = types.str;
         default = "127.0.0.1";
-        description = ''
+        description = lib.mdDoc ''
           Defines the IP address by which CouchDB will be accessible.
         '';
       };
@@ -130,7 +130,7 @@ in {
       port = mkOption {
         type = types.int;
         default = 5984;
-        description = ''
+        description = lib.mdDoc ''
           Defined the port number to listen.
         '';
       };
@@ -138,7 +138,7 @@ in {
       logFile = mkOption {
         type = types.path;
         default = "/var/log/couchdb.log";
-        description = ''
+        description = lib.mdDoc ''
           Specifies the location of file for logging output.
         '';
       };
@@ -146,7 +146,7 @@ in {
       extraConfig = mkOption {
         type = types.lines;
         default = "";
-        description = ''
+        description = lib.mdDoc ''
           Extra configuration. Overrides any other cofiguration.
         '';
       };
@@ -155,14 +155,14 @@ in {
         type = types.path;
         default = "${cfg.package}/etc/vm.args";
         defaultText = literalExpression ''"config.${opt.package}/etc/vm.args"'';
-        description = ''
+        description = lib.mdDoc ''
           vm.args configuration. Overrides Couchdb's Erlang VM parameters file.
         '';
       };
 
       configFile = mkOption {
         type = types.path;
-        description = ''
+        description = lib.mdDoc ''
           Configuration file for persisting runtime changes. File
           needs to be readable and writable from couchdb user/group.
         '';
diff --git a/nixos/modules/services/databases/dgraph.nix b/nixos/modules/services/databases/dgraph.nix
index 5c1ae536051c1..a6178b3d1ccfd 100644
--- a/nixos/modules/services/databases/dgraph.nix
+++ b/nixos/modules/services/databases/dgraph.nix
@@ -60,7 +60,7 @@ in
       settings = mkOption {
         type = settingsFormat.type;
         default = {};
-        description = ''
+        description = lib.mdDoc ''
           Contents of the dgraph config. For more details see https://dgraph.io/docs/deploy/config
         '';
       };
@@ -69,14 +69,14 @@ in
         host = mkOption {
           type = types.str;
           default = "localhost";
-          description = ''
+          description = lib.mdDoc ''
             The host which dgraph alpha will be run on.
           '';
         };
         port = mkOption {
           type = types.port;
           default = 7080;
-          description = ''
+          description = lib.mdDoc ''
             The port which to run dgraph alpha on.
           '';
         };
@@ -87,14 +87,14 @@ in
         host = mkOption {
           type = types.str;
           default = "localhost";
-          description = ''
+          description = lib.mdDoc ''
             The host which dgraph zero will be run on.
           '';
         };
         port = mkOption {
           type = types.port;
           default = 5080;
-          description = ''
+          description = lib.mdDoc ''
             The port which to run dgraph zero on.
           '';
         };
diff --git a/nixos/modules/services/databases/dragonflydb.nix b/nixos/modules/services/databases/dragonflydb.nix
index e72afa9d90890..e35de2019afef 100644
--- a/nixos/modules/services/databases/dragonflydb.nix
+++ b/nixos/modules/services/databases/dragonflydb.nix
@@ -30,55 +30,55 @@ in
       user = mkOption {
         type = types.str;
         default = "dragonfly";
-        description = "The user to run DragonflyDB as";
+        description = lib.mdDoc "The user to run DragonflyDB as";
       };
 
       port = mkOption {
         type = types.port;
         default = 6379;
-        description = "The TCP port to accept connections.";
+        description = lib.mdDoc "The TCP port to accept connections.";
       };
 
       bind = mkOption {
         type = with types; nullOr str;
         default = "127.0.0.1";
-        description = ''
+        description = lib.mdDoc ''
           The IP interface to bind to.
-          <literal>null</literal> means "all interfaces".
+          `null` means "all interfaces".
         '';
       };
 
       requirePass = mkOption {
         type = with types; nullOr str;
         default = null;
-        description = "Password for database";
+        description = lib.mdDoc "Password for database";
         example = "letmein!";
       };
 
       maxMemory = mkOption {
         type = with types; nullOr ints.unsigned;
         default = null;
-        description = ''
+        description = lib.mdDoc ''
           The maximum amount of memory to use for storage (in bytes).
-          <literal>null</literal> means this will be automatically set.
+          `null` means this will be automatically set.
         '';
       };
 
       memcachePort = mkOption {
         type = with types; nullOr port;
         default = null;
-        description = ''
+        description = lib.mdDoc ''
           To enable memcached compatible API on this port.
-          <literal>null</literal> means disabled.
+          `null` means disabled.
         '';
       };
 
       keysOutputLimit = mkOption {
         type = types.ints.unsigned;
         default = 8192;
-        description = ''
+        description = lib.mdDoc ''
           Maximum number of returned keys in keys command.
-          <literal>keys</literal> is a dangerous command.
+          `keys` is a dangerous command.
           We truncate its result to avoid blowup in memory when fetching too many keys.
         '';
       };
@@ -86,13 +86,13 @@ in
       dbNum = mkOption {
         type = with types; nullOr ints.unsigned;
         default = null;
-        description = "Maximum number of supported databases for <literal>select</literal>";
+        description = lib.mdDoc "Maximum number of supported databases for `select`";
       };
 
       cacheMode = mkOption {
         type = with types; nullOr bool;
         default = null;
-        description = ''
+        description = lib.mdDoc ''
           Once this mode is on, Dragonfly will evict items least likely to be stumbled
           upon in the future but only when it is near maxmemory limit.
         '';
diff --git a/nixos/modules/services/databases/firebird.nix b/nixos/modules/services/databases/firebird.nix
index 4e3130bea22f8..3a7ebd6bbd096 100644
--- a/nixos/modules/services/databases/firebird.nix
+++ b/nixos/modules/services/databases/firebird.nix
@@ -56,7 +56,7 @@ in
       port = mkOption {
         default = 3050;
         type = types.port;
-        description = ''
+        description = lib.mdDoc ''
           Port Firebird uses.
         '';
       };
@@ -64,7 +64,7 @@ in
       user = mkOption {
         default = "firebird";
         type = types.str;
-        description = ''
+        description = lib.mdDoc ''
           User account under which firebird runs.
         '';
       };
@@ -72,7 +72,7 @@ in
       baseDir = mkOption {
         default = "/var/lib/firebird";
         type = types.str;
-        description = ''
+        description = lib.mdDoc ''
           Location containing data/ and system/ directories.
           data/ stores the databases, system/ stores the password database security2.fdb.
         '';
diff --git a/nixos/modules/services/databases/foundationdb.nix b/nixos/modules/services/databases/foundationdb.nix
index e22127403e91c..f71228708e426 100644
--- a/nixos/modules/services/databases/foundationdb.nix
+++ b/nixos/modules/services/databases/foundationdb.nix
@@ -66,7 +66,7 @@ in
 
     package = mkOption {
       type        = types.package;
-      description = ''
+      description = lib.mdDoc ''
         The FoundationDB package to use for this server. This must be specified by the user
         in order to ensure migrations and upgrades are controlled appropriately.
       '';
@@ -75,19 +75,19 @@ in
     publicAddress = mkOption {
       type        = types.str;
       default     = "auto";
-      description = "Publicly visible IP address of the process. Port is determined by process ID";
+      description = lib.mdDoc "Publicly visible IP address of the process. Port is determined by process ID";
     };
 
     listenAddress = mkOption {
       type        = types.str;
       default     = "public";
-      description = "Publicly visible IP address of the process. Port is determined by process ID";
+      description = lib.mdDoc "Publicly visible IP address of the process. Port is determined by process ID";
     };
 
     listenPortStart = mkOption {
       type          = types.int;
       default       = 4500;
-      description   = ''
+      description   = lib.mdDoc ''
         Starting port number for database listening sockets. Every FDB process binds to a
         subsequent port, to this number reflects the start of the overall range. e.g. having
         8 server processes will use all ports between 4500 and 4507.
@@ -106,43 +106,43 @@ in
     dataDir = mkOption {
       type        = types.path;
       default     = "/var/lib/foundationdb";
-      description = "Data directory. All cluster data will be put under here.";
+      description = lib.mdDoc "Data directory. All cluster data will be put under here.";
     };
 
     logDir = mkOption {
       type        = types.path;
       default     = "/var/log/foundationdb";
-      description = "Log directory.";
+      description = lib.mdDoc "Log directory.";
     };
 
     user = mkOption {
       type        = types.str;
       default     = "foundationdb";
-      description = "User account under which FoundationDB runs.";
+      description = lib.mdDoc "User account under which FoundationDB runs.";
     };
 
     group = mkOption {
       type        = types.str;
       default     = "foundationdb";
-      description = "Group account under which FoundationDB runs.";
+      description = lib.mdDoc "Group account under which FoundationDB runs.";
     };
 
     class = mkOption {
       type        = types.nullOr (types.enum [ "storage" "transaction" "stateless" ]);
       default     = null;
-      description = "Process class";
+      description = lib.mdDoc "Process class";
     };
 
     restartDelay = mkOption {
       type = types.int;
       default = 10;
-      description = "Number of seconds to wait before restarting servers.";
+      description = lib.mdDoc "Number of seconds to wait before restarting servers.";
     };
 
     logSize = mkOption {
       type        = types.str;
       default     = "10MiB";
-      description = ''
+      description = lib.mdDoc ''
         Roll over to a new log file after the current log file
         reaches the specified size.
       '';
@@ -151,7 +151,7 @@ in
     maxLogSize = mkOption {
       type        = types.str;
       default     = "100MiB";
-      description = ''
+      description = lib.mdDoc ''
         Delete the oldest log file when the total size of all log
         files exceeds the specified size. If set to 0, old log files
         will not be deleted.
@@ -161,33 +161,33 @@ in
     serverProcesses = mkOption {
       type = types.int;
       default = 1;
-      description = "Number of fdbserver processes to run.";
+      description = lib.mdDoc "Number of fdbserver processes to run.";
     };
 
     backupProcesses = mkOption {
       type = types.int;
       default = 1;
-      description = "Number of backup_agent processes to run for snapshots.";
+      description = lib.mdDoc "Number of backup_agent processes to run for snapshots.";
     };
 
     memory = mkOption {
       type        = types.str;
       default     = "8GiB";
-      description = ''
+      description = lib.mdDoc ''
         Maximum memory used by the process. The default value is
-        <literal>8GiB</literal>. When specified without a unit,
-        <literal>MiB</literal> is assumed. This parameter does not
+        `8GiB`. When specified without a unit,
+        `MiB` is assumed. This parameter does not
         change the memory allocation of the program. Rather, it sets
         a hard limit beyond which the process will kill itself and
-        be restarted. The default value of <literal>8GiB</literal>
+        be restarted. The default value of `8GiB`
         is double the intended memory usage in the default
         configuration (providing an emergency buffer to deal with
         memory leaks or similar problems). It is not recommended to
         decrease the value of this parameter below its default
         value. It may be increased if you wish to allocate a very
         large amount of storage engine memory or cache. In
-        particular, when the <literal>storageMemory</literal>
-        parameter is increased, the <literal>memory</literal>
+        particular, when the `storageMemory`
+        parameter is increased, the `memory`
         parameter should be increased by an equal amount.
       '';
     };
@@ -195,22 +195,22 @@ in
     storageMemory = mkOption {
       type        = types.str;
       default     = "1GiB";
-      description = ''
+      description = lib.mdDoc ''
         Maximum memory used for data storage. The default value is
-        <literal>1GiB</literal>. When specified without a unit,
-        <literal>MB</literal> is assumed. Clusters using the memory
+        `1GiB`. When specified without a unit,
+        `MB` is assumed. Clusters using the memory
         storage engine will be restricted to using this amount of
         memory per process for purposes of data storage. Memory
         overhead associated with storing the data is counted against
         this total. If you increase the
-        <literal>storageMemory</literal>, you should also increase
-        the <literal>memory</literal> parameter by the same amount.
+        `storageMemory`, you should also increase
+        the `memory` parameter by the same amount.
       '';
     };
 
     tls = mkOption {
       default = null;
-      description = ''
+      description = lib.mdDoc ''
         FoundationDB Transport Security Layer (TLS) settings.
       '';
 
@@ -218,7 +218,7 @@ in
         options = {
           certificate = mkOption {
             type = types.str;
-            description = ''
+            description = lib.mdDoc ''
               Path to the TLS certificate file. This certificate will
               be offered to, and may be verified by, clients.
             '';
@@ -226,13 +226,13 @@ in
 
           key = mkOption {
             type = types.str;
-            description = "Private key file for the certificate.";
+            description = lib.mdDoc "Private key file for the certificate.";
           };
 
           allowedPeers = mkOption {
             type = types.str;
             default = "Check.Valid=1,Check.Unexpired=1";
-            description = ''
+            description = lib.mdDoc ''
               "Peer verification string". This may be used to adjust which TLS
               client certificates a server will accept, as a form of user
               authorization; for example, it may only accept TLS clients who
@@ -253,7 +253,7 @@ in
         dataHall     = null;
       };
 
-      description = ''
+      description = lib.mdDoc ''
         FoundationDB locality settings.
       '';
 
@@ -262,7 +262,7 @@ in
           machineId = mkOption {
             default = null;
             type = types.nullOr types.str;
-            description = ''
+            description = lib.mdDoc ''
               Machine identifier key. All processes on a machine should share a
               unique id. By default, processes on a machine determine a unique id to share.
               This does not generally need to be set.
@@ -272,7 +272,7 @@ in
           zoneId = mkOption {
             default = null;
             type = types.nullOr types.str;
-            description = ''
+            description = lib.mdDoc ''
               Zone identifier key. Processes that share a zone id are
               considered non-unique for the purposes of data replication.
               If unset, defaults to machine id.
@@ -282,7 +282,7 @@ in
           datacenterId = mkOption {
             default = null;
             type = types.nullOr types.str;
-            description = ''
+            description = lib.mdDoc ''
               Data center identifier key. All processes physically located in a
               data center should share the id. If you are depending on data
               center based replication this must be set on all processes.
@@ -292,7 +292,7 @@ in
           dataHall = mkOption {
             default = null;
             type = types.nullOr types.str;
-            description = ''
+            description = lib.mdDoc ''
               Data hall identifier key. All processes physically located in a
               data hall should share the id. If you are depending on data
               hall based replication this must be set on all processes.
@@ -305,7 +305,7 @@ in
     extraReadWritePaths = mkOption {
       default = [ ];
       type = types.listOf types.path;
-      description = ''
+      description = lib.mdDoc ''
         An extra set of filesystem paths that FoundationDB can read to
         and write from. By default, FoundationDB runs under a heavily
         namespaced systemd environment without write access to most of
@@ -319,13 +319,13 @@ in
     pidfile = mkOption {
       type        = types.path;
       default     = "/run/foundationdb.pid";
-      description = "Path to pidfile for fdbmonitor.";
+      description = lib.mdDoc "Path to pidfile for fdbmonitor.";
     };
 
     traceFormat = mkOption {
       type = types.enum [ "xml" "json" ];
       default = "xml";
-      description = "Trace logging format.";
+      description = lib.mdDoc "Trace logging format.";
     };
   };
 
diff --git a/nixos/modules/services/databases/hbase.nix b/nixos/modules/services/databases/hbase.nix
index fe4f05eec643c..5cc5d97e79846 100644
--- a/nixos/modules/services/databases/hbase.nix
+++ b/nixos/modules/services/databases/hbase.nix
@@ -41,7 +41,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to run HBase.
         '';
       };
@@ -50,7 +50,7 @@ in {
         type = types.package;
         default = pkgs.hbase;
         defaultText = literalExpression "pkgs.hbase";
-        description = ''
+        description = lib.mdDoc ''
           HBase package to use.
         '';
       };
@@ -59,7 +59,7 @@ in {
       user = mkOption {
         type = types.str;
         default = "hbase";
-        description = ''
+        description = lib.mdDoc ''
           User account under which HBase runs.
         '';
       };
@@ -67,7 +67,7 @@ in {
       group = mkOption {
         type = types.str;
         default = "hbase";
-        description = ''
+        description = lib.mdDoc ''
           Group account under which HBase runs.
         '';
       };
@@ -75,7 +75,7 @@ in {
       dataDir = mkOption {
         type = types.path;
         default = "/var/lib/hbase";
-        description = ''
+        description = lib.mdDoc ''
           Specifies location of HBase database files. This location should be
           writable and readable for the user the HBase service runs as
           (hbase by default).
@@ -85,7 +85,7 @@ in {
       logDir = mkOption {
         type = types.path;
         default = "/var/log/hbase";
-        description = ''
+        description = lib.mdDoc ''
           Specifies the location of HBase log files.
         '';
       };
@@ -102,8 +102,8 @@ in {
             "hbase.zookeeper.property.dataDir" = "''${config.${opt.dataDir}}/zookeeper";
           }
         '';
-        description = ''
-          configurations in hbase-site.xml, see <link xlink:href="https://github.com/apache/hbase/blob/master/hbase-server/src/test/resources/hbase-site.xml"/> for details.
+        description = lib.mdDoc ''
+          configurations in hbase-site.xml, see <https://github.com/apache/hbase/blob/master/hbase-server/src/test/resources/hbase-site.xml> for details.
         '';
       };
 
diff --git a/nixos/modules/services/databases/influxdb.nix b/nixos/modules/services/databases/influxdb.nix
index f7383b2023a4e..9b3922c70af34 100644
--- a/nixos/modules/services/databases/influxdb.nix
+++ b/nixos/modules/services/databases/influxdb.nix
@@ -114,38 +114,38 @@ in
 
       enable = mkOption {
         default = false;
-        description = "Whether to enable the influxdb server";
+        description = lib.mdDoc "Whether to enable the influxdb server";
         type = types.bool;
       };
 
       package = mkOption {
         default = pkgs.influxdb;
         defaultText = literalExpression "pkgs.influxdb";
-        description = "Which influxdb derivation to use";
+        description = lib.mdDoc "Which influxdb derivation to use";
         type = types.package;
       };
 
       user = mkOption {
         default = "influxdb";
-        description = "User account under which influxdb runs";
+        description = lib.mdDoc "User account under which influxdb runs";
         type = types.str;
       };
 
       group = mkOption {
         default = "influxdb";
-        description = "Group under which influxdb runs";
+        description = lib.mdDoc "Group under which influxdb runs";
         type = types.str;
       };
 
       dataDir = mkOption {
         default = "/var/db/influxdb";
-        description = "Data directory for influxd data files.";
+        description = lib.mdDoc "Data directory for influxd data files.";
         type = types.path;
       };
 
       extraConfig = mkOption {
         default = {};
-        description = "Extra configuration options for influxdb";
+        description = lib.mdDoc "Extra configuration options for influxdb";
         type = types.attrs;
       };
     };
diff --git a/nixos/modules/services/databases/influxdb2.nix b/nixos/modules/services/databases/influxdb2.nix
index 340c515bbb434..8eeec7816c29f 100644
--- a/nixos/modules/services/databases/influxdb2.nix
+++ b/nixos/modules/services/databases/influxdb2.nix
@@ -15,13 +15,13 @@ in
       package = mkOption {
         default = pkgs.influxdb2-server;
         defaultText = literalExpression "pkgs.influxdb2";
-        description = "influxdb2 derivation to use.";
+        description = lib.mdDoc "influxdb2 derivation to use.";
         type = types.package;
       };
 
       settings = mkOption {
         default = { };
-        description = ''configuration options for influxdb2, see <link xlink:href="https://docs.influxdata.com/influxdb/v2.0/reference/config-options"/> for details.'';
+        description = lib.mdDoc ''configuration options for influxdb2, see <https://docs.influxdata.com/influxdb/v2.0/reference/config-options> for details.'';
         type = format.type;
       };
     };
diff --git a/nixos/modules/services/databases/memcached.nix b/nixos/modules/services/databases/memcached.nix
index 1c06937e2f30f..33627e8ad3491 100644
--- a/nixos/modules/services/databases/memcached.nix
+++ b/nixos/modules/services/databases/memcached.nix
@@ -22,19 +22,19 @@ in
       user = mkOption {
         type = types.str;
         default = "memcached";
-        description = "The user to run Memcached as";
+        description = lib.mdDoc "The user to run Memcached as";
       };
 
       listen = mkOption {
         type = types.str;
         default = "127.0.0.1";
-        description = "The IP address to bind to.";
+        description = lib.mdDoc "The IP address to bind to.";
       };
 
       port = mkOption {
         type = types.port;
         default = 11211;
-        description = "The port to bind to.";
+        description = lib.mdDoc "The port to bind to.";
       };
 
       enableUnixSocket = mkEnableOption "unix socket at /run/memcached/memcached.sock";
@@ -42,19 +42,19 @@ in
       maxMemory = mkOption {
         type = types.ints.unsigned;
         default = 64;
-        description = "The maximum amount of memory to use for storage, in megabytes.";
+        description = lib.mdDoc "The maximum amount of memory to use for storage, in megabytes.";
       };
 
       maxConnections = mkOption {
         type = types.ints.unsigned;
         default = 1024;
-        description = "The maximum number of simultaneous connections.";
+        description = lib.mdDoc "The maximum number of simultaneous connections.";
       };
 
       extraOptions = mkOption {
         type = types.listOf types.str;
         default = [];
-        description = "A list of extra options that will be added as a suffix when running memcached.";
+        description = lib.mdDoc "A list of extra options that will be added as a suffix when running memcached.";
       };
     };
 
diff --git a/nixos/modules/services/databases/monetdb.nix b/nixos/modules/services/databases/monetdb.nix
index 52a2ef041f8b5..c6836128d9ab6 100644
--- a/nixos/modules/services/databases/monetdb.nix
+++ b/nixos/modules/services/databases/monetdb.nix
@@ -18,38 +18,38 @@ in {
         type = types.package;
         default = pkgs.monetdb;
         defaultText = literalExpression "pkgs.monetdb";
-        description = "MonetDB package to use.";
+        description = lib.mdDoc "MonetDB package to use.";
       };
 
       user = mkOption {
         type = types.str;
         default = "monetdb";
-        description = "User account under which MonetDB runs.";
+        description = lib.mdDoc "User account under which MonetDB runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "monetdb";
-        description = "Group under which MonetDB runs.";
+        description = lib.mdDoc "Group under which MonetDB runs.";
       };
 
       dataDir = mkOption {
         type = types.path;
         default = "/var/lib/monetdb";
-        description = "Data directory for the dbfarm.";
+        description = lib.mdDoc "Data directory for the dbfarm.";
       };
 
       port = mkOption {
         type = types.ints.u16;
         default = 50000;
-        description = "Port to listen on.";
+        description = lib.mdDoc "Port to listen on.";
       };
 
       listenAddress = mkOption {
         type = types.str;
         default = "127.0.0.1";
         example = "0.0.0.0";
-        description = "Address to listen on.";
+        description = lib.mdDoc "Address to listen on.";
       };
     };
   };
diff --git a/nixos/modules/services/databases/mongodb.nix b/nixos/modules/services/databases/mongodb.nix
index fccf85d482e07..981185cc534ca 100644
--- a/nixos/modules/services/databases/mongodb.nix
+++ b/nixos/modules/services/databases/mongodb.nix
@@ -43,49 +43,49 @@ in
       user = mkOption {
         type = types.str;
         default = "mongodb";
-        description = "User account under which MongoDB runs";
+        description = lib.mdDoc "User account under which MongoDB runs";
       };
 
       bind_ip = mkOption {
         type = types.str;
         default = "127.0.0.1";
-        description = "IP to bind to";
+        description = lib.mdDoc "IP to bind to";
       };
 
       quiet = mkOption {
         type = types.bool;
         default = false;
-        description = "quieter output";
+        description = lib.mdDoc "quieter output";
       };
 
       enableAuth = mkOption {
         type = types.bool;
         default = false;
-        description = "Enable client authentication. Creates a default superuser with username root!";
+        description = lib.mdDoc "Enable client authentication. Creates a default superuser with username root!";
       };
 
       initialRootPassword = mkOption {
         type = types.nullOr types.str;
         default = null;
-        description = "Password for the root user if auth is enabled.";
+        description = lib.mdDoc "Password for the root user if auth is enabled.";
       };
 
       dbpath = mkOption {
         type = types.str;
         default = "/var/db/mongodb";
-        description = "Location where MongoDB stores its files";
+        description = lib.mdDoc "Location where MongoDB stores its files";
       };
 
       pidFile = mkOption {
         type = types.str;
         default = "/run/mongodb.pid";
-        description = "Location of MongoDB pid file";
+        description = lib.mdDoc "Location of MongoDB pid file";
       };
 
       replSetName = mkOption {
         type = types.str;
         default = "";
-        description = ''
+        description = lib.mdDoc ''
           If this instance is part of a replica set, set its name here.
           Otherwise, leave empty to run as single node.
         '';
@@ -97,13 +97,13 @@ in
         example = ''
           storage.journal.enabled: false
         '';
-        description = "MongoDB extra configuration in YAML format";
+        description = lib.mdDoc "MongoDB extra configuration in YAML format";
       };
 
       initialScript = mkOption {
         type = types.nullOr types.path;
         default = null;
-        description = ''
+        description = lib.mdDoc ''
           A file containing MongoDB statements to execute on first startup.
         '';
       };
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix
index 625b31d081c9a..b7a55900c122f 100644
--- a/nixos/modules/services/databases/mysql.nix
+++ b/nixos/modules/services/databases/mysql.nix
@@ -88,9 +88,9 @@ in
         defaultText = ''
           A configuration file automatically generated by NixOS.
         '';
-        description = ''
+        description = lib.mdDoc ''
           Override the configuration file used by MySQL. By default,
-          NixOS generates one automatically from <option>services.mysql.settings</option>.
+          NixOS generates one automatically from {option}`services.mysql.settings`.
         '';
         example = literalExpression ''
           pkgs.writeText "my.cnf" '''
@@ -143,14 +143,14 @@ in
           options = {
             name = mkOption {
               type = types.str;
-              description = ''
+              description = lib.mdDoc ''
                 The name of the database to create.
               '';
             };
             schema = mkOption {
               type = types.nullOr types.path;
               default = null;
-              description = ''
+              description = lib.mdDoc ''
                 The initial schema of the database; if null (the default),
                 an empty database is created.
               '';
@@ -158,7 +158,7 @@ in
           };
         });
         default = [];
-        description = ''
+        description = lib.mdDoc ''
           List of database names and their initial schemas that should be used to create databases on the first startup
           of MySQL. The schema attribute is optional: If not specified, an empty database is created.
         '';
@@ -171,13 +171,13 @@ in
       initialScript = mkOption {
         type = types.nullOr types.path;
         default = null;
-        description = "A file containing SQL statements to be executed on the first startup. Can be used for granting certain permissions on the database.";
+        description = lib.mdDoc "A file containing SQL statements to be executed on the first startup. Can be used for granting certain permissions on the database.";
       };
 
       ensureDatabases = mkOption {
         type = types.listOf types.str;
         default = [];
-        description = ''
+        description = lib.mdDoc ''
           Ensures that the specified databases exist.
           This option will never delete existing databases, especially not when the value of this
           option is changed. This means that databases created once through this option or
@@ -194,7 +194,7 @@ in
           options = {
             name = mkOption {
               type = types.str;
-              description = ''
+              description = lib.mdDoc ''
                 Name of the user to ensure.
               '';
             };
@@ -223,7 +223,7 @@ in
           };
         });
         default = [];
-        description = ''
+        description = lib.mdDoc ''
           Ensures that the specified users exist and have at least the ensured permissions.
           The MySQL users will be identified using Unix socket authentication. This authenticates the Unix user with the
           same name only, and that without the need for a password.
@@ -253,39 +253,39 @@ in
         role = mkOption {
           type = types.enum [ "master" "slave" "none" ];
           default = "none";
-          description = "Role of the MySQL server instance.";
+          description = lib.mdDoc "Role of the MySQL server instance.";
         };
 
         serverId = mkOption {
           type = types.int;
           default = 1;
-          description = "Id of the MySQL server instance. This number must be unique for each instance.";
+          description = lib.mdDoc "Id of the MySQL server instance. This number must be unique for each instance.";
         };
 
         masterHost = mkOption {
           type = types.str;
-          description = "Hostname of the MySQL master server.";
+          description = lib.mdDoc "Hostname of the MySQL master server.";
         };
 
         slaveHost = mkOption {
           type = types.str;
-          description = "Hostname of the MySQL slave server.";
+          description = lib.mdDoc "Hostname of the MySQL slave server.";
         };
 
         masterUser = mkOption {
           type = types.str;
-          description = "Username of the MySQL replication user.";
+          description = lib.mdDoc "Username of the MySQL replication user.";
         };
 
         masterPassword = mkOption {
           type = types.str;
-          description = "Password of the MySQL replication user.";
+          description = lib.mdDoc "Password of the MySQL replication user.";
         };
 
         masterPort = mkOption {
           type = types.port;
           default = 3306;
-          description = "Port number on which the MySQL master server runs.";
+          description = lib.mdDoc "Port number on which the MySQL master server runs.";
         };
       };
     };
diff --git a/nixos/modules/services/databases/neo4j.nix b/nixos/modules/services/databases/neo4j.nix
index 8816f3b2e4b64..dbbb79f01ebb5 100644
--- a/nixos/modules/services/databases/neo4j.nix
+++ b/nixos/modules/services/databases/neo4j.nix
@@ -123,7 +123,7 @@ in {
     enable = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Whether to enable Neo4j Community Edition.
       '';
     };
@@ -131,7 +131,7 @@ in {
     allowUpgrade = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Allow upgrade of Neo4j database files from an older version.
       '';
     };
@@ -170,9 +170,9 @@ in {
     extraServerConfig = mkOption {
       type = types.lines;
       default = "";
-      description = ''
+      description = lib.mdDoc ''
         Extra configuration for Neo4j Community server. Refer to the
-        <link xlink:href="https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/">complete reference</link>
+        [complete reference](https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/)
         of Neo4j configuration settings.
       '';
     };
@@ -181,7 +181,7 @@ in {
       type = types.package;
       default = pkgs.neo4j;
       defaultText = literalExpression "pkgs.neo4j";
-      description = ''
+      description = lib.mdDoc ''
         Neo4j package to use.
       '';
     };
@@ -189,7 +189,7 @@ in {
     readOnly = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Only allow read operations from this Neo4j instance.
       '';
     };
@@ -197,9 +197,9 @@ in {
     workerCount = mkOption {
       type = types.ints.between 0 44738;
       default = 0;
-      description = ''
+      description = lib.mdDoc ''
         Number of Neo4j worker threads, where the default of
-        <literal>0</literal> indicates a worker count equal to the number of
+        `0` indicates a worker count equal to the number of
         available processors.
       '';
     };
@@ -208,9 +208,9 @@ in {
       enable = mkOption {
         type = types.bool;
         default = true;
-        description = ''
+        description = lib.mdDoc ''
           Enable the BOLT connector for Neo4j. Setting this option to
-          <literal>false</literal> will stop Neo4j from listening for incoming
+          `false` will stop Neo4j from listening for incoming
           connections on the BOLT port (7687 by default).
         '';
       };
@@ -218,9 +218,9 @@ in {
       listenAddress = mkOption {
         type = types.str;
         default = ":7687";
-        description = ''
+        description = lib.mdDoc ''
           Neo4j listen address for BOLT traffic. The listen address is
-          expressed in the format <literal>&lt;ip-address&gt;:&lt;port-number&gt;</literal>.
+          expressed in the format `<ip-address>:<port-number>`.
         '';
       };
 
@@ -247,7 +247,7 @@ in {
       tlsLevel = mkOption {
         type = types.enum [ "REQUIRED" "OPTIONAL" "DISABLED" ];
         default = "OPTIONAL";
-        description = ''
+        description = lib.mdDoc ''
           SSL/TSL requirement level for BOLT traffic.
         '';
       };
@@ -297,11 +297,11 @@ in {
       home = mkOption {
         type = types.path;
         default = "/var/lib/neo4j";
-        description = ''
+        description = lib.mdDoc ''
           Path of the Neo4j home directory. Other default directories are
           subdirectories of this path. This directory will be created if
-          non-existent, and its ownership will be <command>chown</command> to
-          the Neo4j daemon user <literal>neo4j</literal>.
+          non-existent, and its ownership will be {command}`chown` to
+          the Neo4j daemon user `neo4j`.
         '';
       };
 
@@ -343,10 +343,10 @@ in {
       enable = mkOption {
         type = types.bool;
         default = true;
-        description = ''
+        description = lib.mdDoc ''
           The HTTP connector is required for Neo4j, and cannot be disabled.
-          Setting this option to <literal>false</literal> will force the HTTP
-          connector's <option>listenAddress</option> to the loopback
+          Setting this option to `false` will force the HTTP
+          connector's {option}`listenAddress` to the loopback
           interface to prevent connection of remote clients. To prevent all
           clients from connecting, block the HTTP port (7474 by default) by
           firewall.
@@ -356,9 +356,9 @@ in {
       listenAddress = mkOption {
         type = types.str;
         default = ":7474";
-        description = ''
+        description = lib.mdDoc ''
           Neo4j listen address for HTTP traffic. The listen address is
-          expressed in the format <literal>&lt;ip-address&gt;:&lt;port-number&gt;</literal>.
+          expressed in the format `<ip-address>:<port-number>`.
         '';
       };
     };
@@ -367,9 +367,9 @@ in {
       enable = mkOption {
         type = types.bool;
         default = true;
-        description = ''
+        description = lib.mdDoc ''
           Enable the HTTPS connector for Neo4j. Setting this option to
-          <literal>false</literal> will stop Neo4j from listening for incoming
+          `false` will stop Neo4j from listening for incoming
           connections on the HTTPS port (7473 by default).
         '';
       };
@@ -377,9 +377,9 @@ in {
       listenAddress = mkOption {
         type = types.str;
         default = ":7473";
-        description = ''
+        description = lib.mdDoc ''
           Neo4j listen address for HTTPS traffic. The listen address is
-          expressed in the format <literal>&lt;ip-address&gt;:&lt;port-number&gt;</literal>.
+          expressed in the format `<ip-address>:<port-number>`.
         '';
       };
 
@@ -403,9 +403,9 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Enable a remote shell server which Neo4j Shell clients can log in to.
-          Only applicable to <command>neo4j-shell</command>.
+          Only applicable to {command}`neo4j-shell`.
         '';
       };
     };
@@ -456,7 +456,7 @@ in {
           ciphers = mkOption {
             type = types.nullOr (types.listOf types.str);
             default = null;
-            description = ''
+            description = lib.mdDoc ''
               Restrict the allowed ciphers of this policy to those defined
               here. The default ciphers are those of the JVM platform.
             '';
@@ -465,7 +465,7 @@ in {
           clientAuth = mkOption {
             type = types.enum [ "NONE" "OPTIONAL" "REQUIRE" ];
             default = "REQUIRE";
-            description = ''
+            description = lib.mdDoc ''
               The client authentication stance for this policy.
             '';
           };
@@ -473,9 +473,9 @@ in {
           privateKey = mkOption {
             type = types.str;
             default = "private.key";
-            description = ''
+            description = lib.mdDoc ''
               The name of private PKCS #8 key file for this policy to be found
-              in the <option>baseDirectory</option>, or the absolute path to
+              in the {option}`baseDirectory`, or the absolute path to
               the key file. It is mandatory that a key can be found or generated.
             '';
           };
@@ -500,22 +500,22 @@ in {
             type = types.path;
             default = "${config.baseDirectory}/revoked";
             defaultText = literalExpression ''"''${config.${options.baseDirectory}}/revoked"'';
-            description = ''
+            description = lib.mdDoc ''
               Path to directory of CRLs (Certificate Revocation Lists) in
               PEM format. Must be an absolute path. The existence of this
               directory is mandatory and will need to be created manually when:
               setting this option to something other than its default; setting
-              either this policy's <option>baseDirectory</option> or
-              <option>directories.certificates</option> to something other than
+              either this policy's {option}`baseDirectory` or
+              {option}`directories.certificates` to something other than
               their default. Ensure read/write permissions are given to the
-              Neo4j daemon user <literal>neo4j</literal>.
+              Neo4j daemon user `neo4j`.
             '';
           };
 
           tlsVersions = mkOption {
             type = types.listOf types.str;
             default = [ "TLSv1.2" ];
-            description = ''
+            description = lib.mdDoc ''
               Restrict the TLS protocol versions of this policy to those
               defined here.
             '';
@@ -524,7 +524,7 @@ in {
           trustAll = mkOption {
             type = types.bool;
             default = false;
-            description = ''
+            description = lib.mdDoc ''
               Makes this policy trust all remote parties. Enabling this is not
               recommended and the policy's trusted directory will be ignored.
               Use of this mode is discouraged. It would offer encryption but
@@ -573,12 +573,12 @@ in {
 
       }));
       default = {};
-      description = ''
+      description = lib.mdDoc ''
         Defines the SSL policies for use with Neo4j connectors. Each attribute
         of this set defines a policy, with the attribute name defining the name
         of the policy and its namespace. Refer to the operations manual section
         on Neo4j's
-        <link xlink:href="https://neo4j.com/docs/operations-manual/current/security/ssl-framework/">SSL Framework</link>
+        [SSL Framework](https://neo4j.com/docs/operations-manual/current/security/ssl-framework/)
         for further details.
       '';
     };
@@ -587,10 +587,10 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Enable the Usage Data Collector which Neo4j uses to collect usage
           data. Refer to the operations manual section on the
-          <link xlink:href="https://neo4j.com/docs/operations-manual/current/configuration/usage-data-collector/">Usage Data Collector</link>
+          [Usage Data Collector](https://neo4j.com/docs/operations-manual/current/configuration/usage-data-collector/)
           for more information.
         '';
       };
diff --git a/nixos/modules/services/databases/openldap.nix b/nixos/modules/services/databases/openldap.nix
index a6a43e8dab915..9bb0640439475 100644
--- a/nixos/modules/services/databases/openldap.nix
+++ b/nixos/modules/services/databases/openldap.nix
@@ -31,7 +31,7 @@ let
         attrs = mkOption {
           type = types.attrsOf ldapValueType;
           default = {};
-          description = "Attributes of the parent entry.";
+          description = lib.mdDoc "Attributes of the parent entry.";
         };
         children = mkOption {
           # Hide the child attributes, to avoid infinite recursion in e.g. documentation
@@ -40,7 +40,7 @@ let
             hiddenOptions = lib.mapAttrs (name: attr: attr // { visible = false; }) options;
           in types.attrsOf (types.submodule { options = hiddenOptions; });
           default = {};
-          description = "Child entries of the current entry, with recursively the same structure.";
+          description = lib.mdDoc "Child entries of the current entry, with recursively the same structure.";
           example = lib.literalExpression ''
             {
                 "cn=schema" = {
@@ -59,7 +59,7 @@ let
         includes = mkOption {
           type = types.listOf types.path;
           default = [];
-          description = ''
+          description = lib.mdDoc ''
             LDIF files to include after the parent's attributes but before its children.
           '';
         };
@@ -95,7 +95,7 @@ in {
         type = types.package;
         default = pkgs.openldap;
         defaultText = literalExpression "pkgs.openldap";
-        description = ''
+        description = lib.mdDoc ''
           OpenLDAP package to use.
 
           This can be used to, for example, set an OpenLDAP package
@@ -107,25 +107,25 @@ in {
       user = mkOption {
         type = types.str;
         default = "openldap";
-        description = "User account under which slapd runs.";
+        description = lib.mdDoc "User account under which slapd runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "openldap";
-        description = "Group account under which slapd runs.";
+        description = lib.mdDoc "Group account under which slapd runs.";
       };
 
       urlList = mkOption {
         type = types.listOf types.str;
         default = [ "ldap:///" ];
-        description = "URL list slapd should listen on.";
+        description = lib.mdDoc "URL list slapd should listen on.";
         example = [ "ldaps:///" ];
       };
 
       settings = mkOption {
         type = ldapAttrsType;
-        description = "Configuration for OpenLDAP, in OLC format";
+        description = lib.mdDoc "Configuration for OpenLDAP, in OLC format";
         example = lib.literalExpression ''
           {
             attrs.olcLogLevel = [ "stats" ];
@@ -194,7 +194,7 @@ in {
       declarativeContents = mkOption {
         type = with types; attrsOf lines;
         default = {};
-        description = ''
+        description = lib.mdDoc ''
           Declarative contents for the LDAP database, in LDIF format by suffix.
 
           All data will be erased when starting the LDAP server. Modifications
diff --git a/nixos/modules/services/databases/opentsdb.nix b/nixos/modules/services/databases/opentsdb.nix
index e873b2f701157..45c84b12a50eb 100644
--- a/nixos/modules/services/databases/opentsdb.nix
+++ b/nixos/modules/services/databases/opentsdb.nix
@@ -18,7 +18,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to run OpenTSDB.
         '';
       };
@@ -27,7 +27,7 @@ in {
         type = types.package;
         default = pkgs.opentsdb;
         defaultText = literalExpression "pkgs.opentsdb";
-        description = ''
+        description = lib.mdDoc ''
           OpenTSDB package to use.
         '';
       };
@@ -35,7 +35,7 @@ in {
       user = mkOption {
         type = types.str;
         default = "opentsdb";
-        description = ''
+        description = lib.mdDoc ''
           User account under which OpenTSDB runs.
         '';
       };
@@ -43,7 +43,7 @@ in {
       group = mkOption {
         type = types.str;
         default = "opentsdb";
-        description = ''
+        description = lib.mdDoc ''
           Group account under which OpenTSDB runs.
         '';
       };
@@ -51,7 +51,7 @@ in {
       port = mkOption {
         type = types.int;
         default = 4242;
-        description = ''
+        description = lib.mdDoc ''
           Which port OpenTSDB listens on.
         '';
       };
@@ -62,7 +62,7 @@ in {
           tsd.core.auto_create_metrics = true
           tsd.http.request.enable_chunked  = true
         '';
-        description = ''
+        description = lib.mdDoc ''
           The contents of OpenTSDB's configuration file
         '';
       };
diff --git a/nixos/modules/services/databases/pgmanage.nix b/nixos/modules/services/databases/pgmanage.nix
index f30f71866afd6..f50e7244ee115 100644
--- a/nixos/modules/services/databases/pgmanage.nix
+++ b/nixos/modules/services/databases/pgmanage.nix
@@ -50,7 +50,7 @@ in {
       type = types.package;
       default = pkgs.pgmanage;
       defaultText = literalExpression "pkgs.pgmanage";
-      description = ''
+      description = lib.mdDoc ''
         The pgmanage package to use.
       '';
     };
@@ -78,7 +78,7 @@ in {
     allowCustomConnections = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         This tells pgmanage whether or not to allow anyone to use a custom
         connection from the login screen.
       '';
@@ -87,7 +87,7 @@ in {
     port = mkOption {
       type = types.int;
       default = 8080;
-      description = ''
+      description = lib.mdDoc ''
         This tells pgmanage what port to listen on for browser requests.
       '';
     };
@@ -95,7 +95,7 @@ in {
     localOnly = mkOption {
       type = types.bool;
       default = true;
-      description = ''
+      description = lib.mdDoc ''
         This tells pgmanage whether or not to set the listening socket to local
         addresses only.
       '';
@@ -104,7 +104,7 @@ in {
     superOnly = mkOption {
       type = types.bool;
       default = true;
-      description = ''
+      description = lib.mdDoc ''
         This tells pgmanage whether or not to only allow super users to
         login. The recommended value is true and will restrict users who are not
         super users from logging in to any PostgreSQL instance through
@@ -116,7 +116,7 @@ in {
     loginGroup = mkOption {
       type = types.nullOr types.str;
       default = null;
-      description = ''
+      description = lib.mdDoc ''
         This tells pgmanage to only allow users in a certain PostgreSQL group to
         login to pgmanage. Note that a connection will be made to PostgreSQL in
         order to test if the user is a member of the login group.
@@ -126,7 +126,7 @@ in {
     loginTimeout = mkOption {
       type = types.int;
       default = 3600;
-      description = ''
+      description = lib.mdDoc ''
         Number of seconds of inactivity before user is automatically logged
         out.
       '';
@@ -135,7 +135,7 @@ in {
     sqlRoot = mkOption {
       type = types.str;
       default = "/var/lib/pgmanage";
-      description = ''
+      description = lib.mdDoc ''
         This tells pgmanage where to put the SQL file history. All tabs are saved
         to this location so that if you get disconnected from pgmanage you
         don't lose your work.
@@ -147,16 +147,16 @@ in {
         options = {
           cert = mkOption {
             type = types.str;
-            description = "TLS certificate";
+            description = lib.mdDoc "TLS certificate";
           };
           key = mkOption {
             type = types.str;
-            description = "TLS key";
+            description = lib.mdDoc "TLS key";
           };
         };
       });
       default = null;
-      description = ''
+      description = lib.mdDoc ''
         These options tell pgmanage where the TLS Certificate and Key files
         reside. If you use these options then you'll only be able to access
         pgmanage through a secure TLS connection. These options are only
@@ -165,14 +165,14 @@ in {
         configuration. This allows your web server to terminate the secure
         connection and pass on the request to pgmanage. You can find help to set
         up this configuration in:
-        <link xlink:href="https://github.com/pgManage/pgManage/blob/master/INSTALL_NGINX.md"/>
+        <https://github.com/pgManage/pgManage/blob/master/INSTALL_NGINX.md>
       '';
     };
 
     logLevel = mkOption {
       type = types.enum ["error" "warn" "notice" "info"];
       default = "error";
-      description = ''
+      description = lib.mdDoc ''
         Verbosity of logs
       '';
     };
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index 550bd36efff28..e27f4518dfada 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -45,7 +45,7 @@ in
       package = mkOption {
         type = types.package;
         example = literalExpression "pkgs.postgresql_11";
-        description = ''
+        description = lib.mdDoc ''
           PostgreSQL package to use.
         '';
       };
@@ -53,7 +53,7 @@ in
       port = mkOption {
         type = types.int;
         default = 5432;
-        description = ''
+        description = lib.mdDoc ''
           The port on which PostgreSQL listens.
         '';
       };
@@ -61,14 +61,14 @@ in
       checkConfig = mkOption {
         type = types.bool;
         default = true;
-        description = "Check the syntax of the configuration file at compile time";
+        description = lib.mdDoc "Check the syntax of the configuration file at compile time";
       };
 
       dataDir = mkOption {
         type = types.path;
         defaultText = literalExpression ''"/var/lib/postgresql/''${config.services.postgresql.package.psqlSchema}"'';
         example = "/var/lib/postgresql/11";
-        description = ''
+        description = lib.mdDoc ''
           The data directory for PostgreSQL. If left as the default value
           this directory will automatically be created before the PostgreSQL server starts, otherwise
           the sysadmin is responsible for ensuring the directory exists with appropriate ownership
@@ -96,7 +96,7 @@ in
       identMap = mkOption {
         type = types.lines;
         default = "";
-        description = ''
+        description = lib.mdDoc ''
           Defines the mapping from system users to database users.
 
           The general form is:
@@ -109,8 +109,8 @@ in
         type = with types; listOf str;
         default = [];
         example = [ "--data-checksums" "--allow-group-access" ];
-        description = ''
-          Additional arguments passed to <literal>initdb</literal> during data dir
+        description = lib.mdDoc ''
+          Additional arguments passed to `initdb` during data dir
           initialisation.
         '';
       };
@@ -118,7 +118,7 @@ in
       initialScript = mkOption {
         type = types.nullOr types.path;
         default = null;
-        description = ''
+        description = lib.mdDoc ''
           A file containing SQL statements to execute on first startup.
         '';
       };
@@ -126,7 +126,7 @@ in
       ensureDatabases = mkOption {
         type = types.listOf types.str;
         default = [];
-        description = ''
+        description = lib.mdDoc ''
           Ensures that the specified databases exist.
           This option will never delete existing databases, especially not when the value of this
           option is changed. This means that databases created once through this option or
@@ -143,7 +143,7 @@ in
           options = {
             name = mkOption {
               type = types.str;
-              description = ''
+              description = lib.mdDoc ''
                 Name of the user to ensure.
               '';
             };
@@ -171,7 +171,7 @@ in
           };
         });
         default = [];
-        description = ''
+        description = lib.mdDoc ''
           Ensures that the specified users exist and have at least the ensured permissions.
           The PostgreSQL users will be identified using peer authentication. This authenticates the Unix user with the
           same name only, and that without the need for a password.
@@ -200,7 +200,7 @@ in
       enableTCPIP = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether PostgreSQL should listen on all network interfaces.
           If disabled, the database can only be accessed via its Unix
           domain socket or via TCP connections to localhost.
@@ -211,9 +211,9 @@ in
         type = types.str;
         default = "[%p] ";
         example = "%m [%p] ";
-        description = ''
+        description = lib.mdDoc ''
           A printf-style string that is output at the beginning of each log line.
-          Upstream default is <literal>'%m [%p] '</literal>, i.e. it includes the timestamp. We do
+          Upstream default is `'%m [%p] '`, i.e. it includes the timestamp. We do
           not include the timestamp, because journal has it anyway.
         '';
       };
@@ -222,9 +222,9 @@ in
         type = types.listOf types.path;
         default = [];
         example = literalExpression "with pkgs.postgresql_11.pkgs; [ postgis pg_repack ]";
-        description = ''
+        description = lib.mdDoc ''
           List of PostgreSQL plugins. PostgreSQL version for each plugin should
-          match version for <literal>services.postgresql.package</literal> value.
+          match version for `services.postgresql.package` value.
         '';
       };
 
@@ -255,8 +255,8 @@ in
       recoveryConfig = mkOption {
         type = types.nullOr types.lines;
         default = null;
-        description = ''
-          Contents of the <filename>recovery.conf</filename> file.
+        description = lib.mdDoc ''
+          Contents of the {file}`recovery.conf` file.
         '';
       };
 
diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix
index 5532c54019706..b346438cfffca 100644
--- a/nixos/modules/services/databases/redis.nix
+++ b/nixos/modules/services/databases/redis.nix
@@ -58,7 +58,7 @@ in {
         type = types.package;
         default = pkgs.redis;
         defaultText = literalExpression "pkgs.redis";
-        description = "Which Redis derivation to use.";
+        description = lib.mdDoc "Which Redis derivation to use.";
       };
 
       vmOverCommit = mkEnableOption ''
@@ -84,14 +84,14 @@ in {
               defaultText = literalExpression ''
                 if name == "" then "redis" else "redis-''${name}"
               '';
-              description = "The username and groupname for redis-server.";
+              description = lib.mdDoc "The username and groupname for redis-server.";
             };
 
             port = mkOption {
               type = types.port;
               default = if name == "" then 6379 else 0;
               defaultText = literalExpression ''if name == "" then 6379 else 0'';
-              description = ''
+              description = lib.mdDoc ''
                 The TCP port to accept connections.
                 If port 0 is specified Redis will not listen on a TCP socket.
               '';
@@ -100,7 +100,7 @@ in {
             openFirewall = mkOption {
               type = types.bool;
               default = false;
-              description = ''
+              description = lib.mdDoc ''
                 Whether to open ports in the firewall for the server.
               '';
             };
@@ -108,9 +108,9 @@ in {
             bind = mkOption {
               type = with types; nullOr str;
               default = "127.0.0.1";
-              description = ''
+              description = lib.mdDoc ''
                 The IP interface to bind to.
-                <literal>null</literal> means "all interfaces".
+                `null` means "all interfaces".
               '';
               example = "192.0.2.1";
             };
@@ -121,13 +121,13 @@ in {
               defaultText = literalExpression ''
                 if name == "" then "/run/redis/redis.sock" else "/run/redis-''${name}/redis.sock"
               '';
-              description = "The path to the socket to bind to.";
+              description = lib.mdDoc "The path to the socket to bind to.";
             };
 
             unixSocketPerm = mkOption {
               type = types.int;
               default = 660;
-              description = "Change permissions for the socket";
+              description = lib.mdDoc "Change permissions for the socket";
               example = 600;
             };
 
@@ -135,32 +135,32 @@ in {
               type = types.str;
               default = "notice"; # debug, verbose, notice, warning
               example = "debug";
-              description = "Specify the server verbosity level, options: debug, verbose, notice, warning.";
+              description = lib.mdDoc "Specify the server verbosity level, options: debug, verbose, notice, warning.";
             };
 
             logfile = mkOption {
               type = types.str;
               default = "/dev/null";
-              description = "Specify the log file name. Also 'stdout' can be used to force Redis to log on the standard output.";
+              description = lib.mdDoc "Specify the log file name. Also 'stdout' can be used to force Redis to log on the standard output.";
               example = "/var/log/redis.log";
             };
 
             syslog = mkOption {
               type = types.bool;
               default = true;
-              description = "Enable logging to the system logger.";
+              description = lib.mdDoc "Enable logging to the system logger.";
             };
 
             databases = mkOption {
               type = types.int;
               default = 16;
-              description = "Set the number of databases.";
+              description = lib.mdDoc "Set the number of databases.";
             };
 
             maxclients = mkOption {
               type = types.int;
               default = 10000;
-              description = "Set the max number of connected clients at the same time.";
+              description = lib.mdDoc "Set the max number of connected clients at the same time.";
             };
 
             save = mkOption {
@@ -178,27 +178,27 @@ in {
                 options = {
                   ip = mkOption {
                     type = str;
-                    description = "IP of the Redis master";
+                    description = lib.mdDoc "IP of the Redis master";
                     example = "192.168.1.100";
                   };
 
                   port = mkOption {
                     type = port;
-                    description = "port of the Redis master";
+                    description = lib.mdDoc "port of the Redis master";
                     default = 6379;
                   };
                 };
               }));
 
               default = null;
-              description = "IP and port to which this redis instance acts as a slave.";
+              description = lib.mdDoc "IP and port to which this redis instance acts as a slave.";
               example = { ip = "192.168.1.100"; port = 6379; };
             };
 
             masterAuth = mkOption {
               type = with types; nullOr str;
               default = null;
-              description = ''If the master is password protected (using the requirePass configuration)
+              description = lib.mdDoc ''If the master is password protected (using the requirePass configuration)
               it is possible to tell the slave to authenticate before starting the replication synchronization
               process, otherwise the master will refuse the slave request.
               (STORED PLAIN TEXT, WORLD-READABLE IN NIX STORE)'';
@@ -207,7 +207,7 @@ in {
             requirePass = mkOption {
               type = with types; nullOr str;
               default = null;
-              description = ''
+              description = lib.mdDoc ''
                 Password for database (STORED PLAIN TEXT, WORLD-READABLE IN NIX STORE).
                 Use requirePassFile to store it outside of the nix store in a dedicated file.
               '';
@@ -217,42 +217,42 @@ in {
             requirePassFile = mkOption {
               type = with types; nullOr path;
               default = null;
-              description = "File with password for the database.";
+              description = lib.mdDoc "File with password for the database.";
               example = "/run/keys/redis-password";
             };
 
             appendOnly = mkOption {
               type = types.bool;
               default = false;
-              description = "By default data is only periodically persisted to disk, enable this option to use an append-only file for improved persistence.";
+              description = lib.mdDoc "By default data is only periodically persisted to disk, enable this option to use an append-only file for improved persistence.";
             };
 
             appendFsync = mkOption {
               type = types.str;
               default = "everysec"; # no, always, everysec
-              description = "How often to fsync the append-only log, options: no, always, everysec.";
+              description = lib.mdDoc "How often to fsync the append-only log, options: no, always, everysec.";
             };
 
             slowLogLogSlowerThan = mkOption {
               type = types.int;
               default = 10000;
-              description = "Log queries whose execution take longer than X in milliseconds.";
+              description = lib.mdDoc "Log queries whose execution take longer than X in milliseconds.";
               example = 1000;
             };
 
             slowLogMaxLen = mkOption {
               type = types.int;
               default = 128;
-              description = "Maximum number of items to keep in slow log.";
+              description = lib.mdDoc "Maximum number of items to keep in slow log.";
             };
 
             settings = mkOption {
               # TODO: this should be converted to freeformType
               type = with types; attrsOf (oneOf [ bool int str (listOf str) ]);
               default = {};
-              description = ''
+              description = lib.mdDoc ''
                 Redis configuration. Refer to
-                <link xlink:href="https://redis.io/topics/config"/>
+                <https://redis.io/topics/config>
                 for details on supported values.
               '';
               example = literalExpression ''
@@ -294,7 +294,7 @@ in {
             (mkIf (config.requirePass != null) { requirepass = config.requirePass; })
           ];
         }));
-        description = "Configuration of multiple <literal>redis-server</literal> instances.";
+        description = lib.mdDoc "Configuration of multiple `redis-server` instances.";
         default = {};
       };
     };
diff --git a/nixos/modules/services/databases/victoriametrics.nix b/nixos/modules/services/databases/victoriametrics.nix
index 0513dcff172b3..28a6ccfd5e20c 100644
--- a/nixos/modules/services/databases/victoriametrics.nix
+++ b/nixos/modules/services/databases/victoriametrics.nix
@@ -7,21 +7,21 @@ let cfg = config.services.victoriametrics; in
       type = types.package;
       default = pkgs.victoriametrics;
       defaultText = literalExpression "pkgs.victoriametrics";
-      description = ''
+      description = lib.mdDoc ''
         The VictoriaMetrics distribution to use.
       '';
     };
     listenAddress = mkOption {
       default = ":8428";
       type = types.str;
-      description = ''
+      description = lib.mdDoc ''
         The listen address for the http interface.
       '';
     };
     retentionPeriod = mkOption {
       type = types.int;
       default = 1;
-      description = ''
+      description = lib.mdDoc ''
         Retention period in months.
       '';
     };