about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/misc
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-05-03 15:14:25 +0200
committerAlyssa Ross <hi@alyssa.is>2024-05-07 11:19:19 +0200
commitd92b2b6a1bbd322dd65a8b6f51019610d350046e (patch)
tree7f7c21927b9cc05676501f297c51eb76b49e326c /nixpkgs/nixos/modules/services/misc
parent93c9e56b40530cc627d921cfc255c05b495d4017 (diff)
parent49050352f602fe87d16ff7b2b6a05b79eb20dc6f (diff)
downloadnixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar.gz
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar.bz2
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar.lz
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar.xz
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar.zst
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.zip
Merge remote-tracking branch 'nixpkgs/nixos-unstable-small'
Conflicts:
	nixpkgs/nixos/modules/services/mail/mailman.nix
	nixpkgs/nixos/modules/services/mail/public-inbox.nix
	nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/nixos/modules/services/misc')
-rw-r--r--nixpkgs/nixos/modules/services/misc/airsonic.nix22
-rw-r--r--nixpkgs/nixos/modules/services/misc/amazon-ssm-agent.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/ananicy.nix12
-rw-r--r--nixpkgs/nixos/modules/services/misc/ankisyncd.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/apache-kafka.nix26
-rw-r--r--nixpkgs/nixos/modules/services/misc/atuin.nix20
-rw-r--r--nixpkgs/nixos/modules/services/misc/autofs.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/autorandr.nix59
-rw-r--r--nixpkgs/nixos/modules/services/misc/autosuspend.nix22
-rw-r--r--nixpkgs/nixos/modules/services/misc/bazarr.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/bcg.nix40
-rw-r--r--nixpkgs/nixos/modules/services/misc/beanstalkd.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/bees.nix12
-rw-r--r--nixpkgs/nixos/modules/services/misc/bepasty.nix18
-rw-r--r--nixpkgs/nixos/modules/services/misc/calibre-server.nix18
-rw-r--r--nixpkgs/nixos/modules/services/misc/canto-daemon.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/cfdyndns.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/cgminer.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/clipcat.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/clipmenu.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/confd.nix16
-rw-r--r--nixpkgs/nixos/modules/services/misc/cpuminer-cryptonight.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/db-rest.nix182
-rw-r--r--nixpkgs/nixos/modules/services/misc/devmon.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/dictd.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/disnix.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/docker-registry.nix38
-rw-r--r--nixpkgs/nixos/modules/services/misc/domoticz.nix6
-rw-r--r--nixpkgs/nixos/modules/services/misc/duckling.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/dwm-status.nix6
-rw-r--r--nixpkgs/nixos/modules/services/misc/dysnomia.nix20
-rw-r--r--nixpkgs/nixos/modules/services/misc/errbot.nix16
-rw-r--r--nixpkgs/nixos/modules/services/misc/etebase-server.nix30
-rw-r--r--nixpkgs/nixos/modules/services/misc/etesync-dav.nix14
-rw-r--r--nixpkgs/nixos/modules/services/misc/evdevremapkeys.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/felix.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/forgejo.nix77
-rw-r--r--nixpkgs/nixos/modules/services/misc/freeswitch.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/fstrim.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/gammu-smsd.nix44
-rw-r--r--nixpkgs/nixos/modules/services/misc/geoipupdate.nix18
-rw-r--r--nixpkgs/nixos/modules/services/misc/gitea.nix92
-rw-r--r--nixpkgs/nixos/modules/services/misc/gitlab.nix223
-rw-r--r--nixpkgs/nixos/modules/services/misc/gitolite.nix18
-rw-r--r--nixpkgs/nixos/modules/services/misc/gitweb.nix6
-rw-r--r--nixpkgs/nixos/modules/services/misc/gogs.nix44
-rw-r--r--nixpkgs/nixos/modules/services/misc/gollum.nix30
-rw-r--r--nixpkgs/nixos/modules/services/misc/gpsd.nix16
-rw-r--r--nixpkgs/nixos/modules/services/misc/graphical-desktop.nix54
-rw-r--r--nixpkgs/nixos/modules/services/misc/greenclip.nix7
-rw-r--r--nixpkgs/nixos/modules/services/misc/headphones.nix14
-rw-r--r--nixpkgs/nixos/modules/services/misc/heisenbridge.nix22
-rw-r--r--nixpkgs/nixos/modules/services/misc/homepage-dashboard.nix22
-rw-r--r--nixpkgs/nixos/modules/services/misc/ihaskell.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/input-remapper.nix6
-rw-r--r--nixpkgs/nixos/modules/services/misc/invidious-router.nix121
-rw-r--r--nixpkgs/nixos/modules/services/misc/irkerd.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/jackett.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/jellyseerr.nix6
-rw-r--r--nixpkgs/nixos/modules/services/misc/klipper.nix36
-rw-r--r--nixpkgs/nixos/modules/services/misc/languagetool.nix12
-rw-r--r--nixpkgs/nixos/modules/services/misc/leaps.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/libreddit.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/lidarr.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/lifecycled.nix26
-rw-r--r--nixpkgs/nixos/modules/services/misc/llama-cpp.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/logkeys.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/mame.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/mbpfan.nix29
-rw-r--r--nixpkgs/nixos/modules/services/misc/mediatomb.nix38
-rw-r--r--nixpkgs/nixos/modules/services/misc/metabase.nix14
-rw-r--r--nixpkgs/nixos/modules/services/misc/moonraker.nix20
-rw-r--r--nixpkgs/nixos/modules/services/misc/mqtt2influxdb.nix46
-rw-r--r--nixpkgs/nixos/modules/services/misc/n8n.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/nitter.nix82
-rw-r--r--nixpkgs/nixos/modules/services/misc/nix-gc.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/nix-optimise.nix12
-rw-r--r--nixpkgs/nixos/modules/services/misc/nix-ssh-serve.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/novacomd.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/ntfy-sh.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/nzbget.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/nzbhydra2.nix7
-rw-r--r--nixpkgs/nixos/modules/services/misc/octoprint.nix18
-rw-r--r--nixpkgs/nixos/modules/services/misc/ollama.nix71
-rw-r--r--nixpkgs/nixos/modules/services/misc/ombi.nix18
-rw-r--r--nixpkgs/nixos/modules/services/misc/osrm.nix14
-rw-r--r--nixpkgs/nixos/modules/services/misc/owncast.nix16
-rw-r--r--nixpkgs/nixos/modules/services/misc/packagekit.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/paperless.nix97
-rw-r--r--nixpkgs/nixos/modules/services/misc/parsoid.nix12
-rw-r--r--nixpkgs/nixos/modules/services/misc/persistent-evdev.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/pinnwand.nix14
-rw-r--r--nixpkgs/nixos/modules/services/misc/plex.nix14
-rw-r--r--nixpkgs/nixos/modules/services/misc/plikd.nix6
-rw-r--r--nixpkgs/nixos/modules/services/misc/podgrab.nix47
-rw-r--r--nixpkgs/nixos/modules/services/misc/polaris.nix14
-rw-r--r--nixpkgs/nixos/modules/services/misc/portunus.nix40
-rw-r--r--nixpkgs/nixos/modules/services/misc/prowlarr.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/pufferpanel.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/pykms.nix14
-rw-r--r--nixpkgs/nixos/modules/services/misc/radarr.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/readarr.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/redmine.nix92
-rw-r--r--nixpkgs/nixos/modules/services/misc/ripple-data-api.nix30
-rw-r--r--nixpkgs/nixos/modules/services/misc/rippled.nix68
-rw-r--r--nixpkgs/nixos/modules/services/misc/rkvm.nix22
-rw-r--r--nixpkgs/nixos/modules/services/misc/rmfakecloud.nix12
-rw-r--r--nixpkgs/nixos/modules/services/misc/rshim.nix12
-rw-r--r--nixpkgs/nixos/modules/services/misc/safeeyes.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/sdrplay.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/serviio.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/sickbeard.nix12
-rw-r--r--nixpkgs/nixos/modules/services/misc/signald.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/siproxd.nix28
-rw-r--r--nixpkgs/nixos/modules/services/misc/snapper.nix22
-rw-r--r--nixpkgs/nixos/modules/services/misc/soft-serve.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/sonarr.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/sourcehut/default.nix178
-rw-r--r--nixpkgs/nixos/modules/services/misc/sourcehut/service.nix18
-rw-r--r--nixpkgs/nixos/modules/services/misc/spice-autorandr.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/spice-vdagentd.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/spice-webdavd.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/sssd.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/subsonic.nix22
-rw-r--r--nixpkgs/nixos/modules/services/misc/sundtek.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/svnserve.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/synergy.nix22
-rw-r--r--nixpkgs/nixos/modules/services/misc/sysprof.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/tabby.nix16
-rw-r--r--nixpkgs/nixos/modules/services/misc/tandoor-recipes.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/taskserver/default.nix48
-rw-r--r--nixpkgs/nixos/modules/services/misc/tautulli.nix14
-rw-r--r--nixpkgs/nixos/modules/services/misc/tiddlywiki.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/tp-auto-kbbl.nix6
-rw-r--r--nixpkgs/nixos/modules/services/misc/transfer-sh.nix10
-rw-r--r--nixpkgs/nixos/modules/services/misc/tuxclocker.nix12
-rw-r--r--nixpkgs/nixos/modules/services/misc/tzupdate.nix2
-rw-r--r--nixpkgs/nixos/modules/services/misc/uhub.nix14
-rw-r--r--nixpkgs/nixos/modules/services/misc/wastebin.nix158
-rw-r--r--nixpkgs/nixos/modules/services/misc/weechat.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/workout-tracker.nix83
-rw-r--r--nixpkgs/nixos/modules/services/misc/xmr-stak.nix8
-rw-r--r--nixpkgs/nixos/modules/services/misc/xmrig.nix4
-rw-r--r--nixpkgs/nixos/modules/services/misc/zoneminder.nix28
-rw-r--r--nixpkgs/nixos/modules/services/misc/zookeeper.nix22
145 files changed, 2086 insertions, 1337 deletions
diff --git a/nixpkgs/nixos/modules/services/misc/airsonic.nix b/nixpkgs/nixos/modules/services/misc/airsonic.nix
index 6ba6ff5ca3cb..6095268eb960 100644
--- a/nixpkgs/nixos/modules/services/misc/airsonic.nix
+++ b/nixpkgs/nixos/modules/services/misc/airsonic.nix
@@ -9,18 +9,18 @@ in {
   options = {
 
     services.airsonic = {
-      enable = mkEnableOption (lib.mdDoc "Airsonic, the Free and Open Source media streaming server (fork of Subsonic and Libresonic)");
+      enable = mkEnableOption "Airsonic, the Free and Open Source media streaming server (fork of Subsonic and Libresonic)";
 
       user = mkOption {
         type = types.str;
         default = "airsonic";
-        description = lib.mdDoc "User account under which airsonic runs.";
+        description = "User account under which airsonic runs.";
       };
 
       home = mkOption {
         type = types.path;
         default = "/var/lib/airsonic";
-        description = lib.mdDoc ''
+        description = ''
           The directory where Airsonic will create files.
           Make sure it is writable.
         '';
@@ -29,7 +29,7 @@ in {
       virtualHost = mkOption {
         type = types.nullOr types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           Name of the nginx virtualhost to use and setup. If null, do not setup any virtualhost.
         '';
       };
@@ -37,7 +37,7 @@ in {
       listenAddress = mkOption {
         type = types.str;
         default = "127.0.0.1";
-        description = lib.mdDoc ''
+        description = ''
           The host name or IP address on which to bind Airsonic.
           The default value is appropriate for first launch, when the
           default credentials are easy to guess. It is also appropriate
@@ -50,7 +50,7 @@ in {
       port = mkOption {
         type = types.port;
         default = 4040;
-        description = lib.mdDoc ''
+        description = ''
           The port on which Airsonic will listen for
           incoming HTTP traffic. Set to 0 to disable.
         '';
@@ -59,7 +59,7 @@ in {
       contextPath = mkOption {
         type = types.path;
         default = "/";
-        description = lib.mdDoc ''
+        description = ''
           The context path, i.e., the last part of the Airsonic
           URL. Typically '/' or '/airsonic'. Default '/'
         '';
@@ -68,7 +68,7 @@ in {
       maxMemory = mkOption {
         type = types.int;
         default = 100;
-        description = lib.mdDoc ''
+        description = ''
           The memory limit (max Java heap size) in megabytes.
           Default: 100
         '';
@@ -78,7 +78,7 @@ in {
         type = types.listOf types.path;
         default = [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
         defaultText = literalExpression ''[ "''${pkgs.ffmpeg.bin}/bin/ffmpeg" ]'';
-        description = lib.mdDoc ''
+        description = ''
           List of paths to transcoder executables that should be accessible
           from Airsonic. Symlinks will be created to each executable inside
           ''${config.${opt.home}}/transcoders.
@@ -98,11 +98,11 @@ in {
         type = types.path;
         default = "${pkgs.airsonic}/webapps/airsonic.war";
         defaultText = literalExpression ''"''${pkgs.airsonic}/webapps/airsonic.war"'';
-        description = lib.mdDoc "Airsonic war file to use.";
+        description = "Airsonic war file to use.";
       };
 
       jvmOptions = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           Extra command line options for the JVM running AirSonic.
           Useful for sending jukebox output to non-default alsa
           devices.
diff --git a/nixpkgs/nixos/modules/services/misc/amazon-ssm-agent.nix b/nixpkgs/nixos/modules/services/misc/amazon-ssm-agent.nix
index 89a1c0766510..9ab4a7f96d08 100644
--- a/nixpkgs/nixos/modules/services/misc/amazon-ssm-agent.nix
+++ b/nixpkgs/nixos/modules/services/misc/amazon-ssm-agent.nix
@@ -27,11 +27,11 @@ in {
   ];
 
   options.services.amazon-ssm-agent = {
-    enable = mkEnableOption (lib.mdDoc "Amazon SSM agent");
+    enable = mkEnableOption "Amazon SSM agent";
 
     package = mkOption {
       type = types.path;
-      description = lib.mdDoc "The Amazon SSM agent package to use";
+      description = "The Amazon SSM agent package to use";
       default = pkgs.amazon-ssm-agent.override { overrideEtc = false; };
       defaultText = literalExpression "pkgs.amazon-ssm-agent.override { overrideEtc = false; }";
     };
diff --git a/nixpkgs/nixos/modules/services/misc/ananicy.nix b/nixpkgs/nixos/modules/services/misc/ananicy.nix
index 01e1053c9e0e..f7ab41fcce61 100644
--- a/nixpkgs/nixos/modules/services/misc/ananicy.nix
+++ b/nixpkgs/nixos/modules/services/misc/ananicy.nix
@@ -13,7 +13,7 @@ in
 {
   options = {
     services.ananicy = {
-      enable = mkEnableOption (lib.mdDoc "Ananicy, an auto nice daemon");
+      enable = mkEnableOption "Ananicy, an auto nice daemon";
 
       package = mkPackageOption pkgs "ananicy" {
         example = "ananicy-cpp";
@@ -22,7 +22,7 @@ in
       rulesProvider = mkPackageOption pkgs "ananicy" {
         example = "ananicy-cpp";
       } // {
-        description = lib.mdDoc ''
+        description = ''
           Which package to copy default rules,types,cgroups from.
         '';
       };
@@ -33,7 +33,7 @@ in
         example = {
           apply_nice = false;
         };
-        description = lib.mdDoc ''
+        description = ''
           See <https://github.com/Nefelim4ag/Ananicy/blob/master/ananicy.d/ananicy.conf>
         '';
       };
@@ -41,7 +41,7 @@ in
       extraRules = mkOption {
         type = with types; listOf attrs;
         default = [ ];
-        description = lib.mdDoc ''
+        description = ''
           Rules to write in 'nixRules.rules'. See:
           <https://github.com/Nefelim4ag/Ananicy#configuration>
           <https://gitlab.com/ananicy-cpp/ananicy-cpp/#global-configuration>
@@ -54,7 +54,7 @@ in
       extraTypes = mkOption {
         type = with types; listOf attrs;
         default = [ ];
-        description = lib.mdDoc ''
+        description = ''
           Types to write in 'nixTypes.types'. See:
           <https://gitlab.com/ananicy-cpp/ananicy-cpp/#types>
         '';
@@ -66,7 +66,7 @@ in
       extraCgroups = mkOption {
         type = with types; listOf attrs;
         default = [ ];
-        description = lib.mdDoc ''
+        description = ''
           Cgroups to write in 'nixCgroups.cgroups'. See:
           <https://gitlab.com/ananicy-cpp/ananicy-cpp/#cgroups>
         '';
diff --git a/nixpkgs/nixos/modules/services/misc/ankisyncd.nix b/nixpkgs/nixos/modules/services/misc/ankisyncd.nix
index f5acfbb0ee96..b999b02534e7 100644
--- a/nixpkgs/nixos/modules/services/misc/ankisyncd.nix
+++ b/nixpkgs/nixos/modules/services/misc/ankisyncd.nix
@@ -22,26 +22,26 @@ let
 in
   {
     options.services.ankisyncd = {
-      enable = mkEnableOption (lib.mdDoc "ankisyncd");
+      enable = mkEnableOption "ankisyncd, a standalone unofficial anky sync server";
 
       package = mkPackageOption pkgs "ankisyncd" { };
 
       host = mkOption {
         type = types.str;
         default = "localhost";
-        description = lib.mdDoc "ankisyncd host";
+        description = "ankisyncd host";
       };
 
       port = mkOption {
         type = types.port;
         default = 27701;
-        description = lib.mdDoc "ankisyncd port";
+        description = "ankisyncd port";
       };
 
       openFirewall = mkOption {
         default = false;
         type = types.bool;
-        description = lib.mdDoc "Whether to open the firewall for the specified port.";
+        description = "Whether to open the firewall for the specified port.";
       };
     };
 
diff --git a/nixpkgs/nixos/modules/services/misc/apache-kafka.nix b/nixpkgs/nixos/modules/services/misc/apache-kafka.nix
index b7281a0d9d5f..d1a3d92f2e22 100644
--- a/nixpkgs/nixos/modules/services/misc/apache-kafka.nix
+++ b/nixpkgs/nixos/modules/services/misc/apache-kafka.nix
@@ -32,10 +32,10 @@ let
 in {
 
   options.services.apache-kafka = {
-    enable = mkEnableOption (lib.mdDoc "Apache Kafka event streaming broker");
+    enable = mkEnableOption "Apache Kafka event streaming broker";
 
     settings = mkOption {
-      description = lib.mdDoc ''
+      description = ''
         [Kafka broker configuration](https://kafka.apache.org/documentation.html#brokerconfigs)
         {file}`server.properties`.
 
@@ -51,13 +51,13 @@ in {
 
         options = {
           "broker.id" = mkOption {
-            description = lib.mdDoc "Broker ID. -1 or null to auto-allocate in zookeeper mode.";
+            description = "Broker ID. -1 or null to auto-allocate in zookeeper mode.";
             default = null;
             type = with types; nullOr int;
           };
 
           "log.dirs" = mkOption {
-            description = lib.mdDoc "Log file directories.";
+            description = "Log file directories.";
             # Deliberaly leave out old default and use the rewrite opportunity
             # to have users choose a safer value -- /tmp might be volatile and is a
             # slightly scary default choice.
@@ -66,7 +66,7 @@ in {
           };
 
           "listeners" = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Kafka Listener List.
               See [listeners](https://kafka.apache.org/documentation/#brokerconfigs_listeners).
             '';
@@ -78,7 +78,7 @@ in {
     };
 
     clusterId = mkOption {
-      description = lib.mdDoc ''
+      description = ''
         KRaft mode ClusterId used for formatting log directories. Can be generated with `kafka-storage.sh random-uuid`
       '';
       type = with types; nullOr str;
@@ -86,7 +86,7 @@ in {
     };
 
     configFiles.serverProperties = mkOption {
-      description = lib.mdDoc ''
+      description = ''
         Kafka server.properties configuration file path.
         Defaults to the rendered `settings`.
       '';
@@ -94,14 +94,14 @@ in {
     };
 
     configFiles.log4jProperties = mkOption {
-      description = lib.mdDoc "Kafka log4j property configuration file path";
+      description = "Kafka log4j property configuration file path";
       type = types.path;
       default = pkgs.writeText "log4j.properties" cfg.log4jProperties;
       defaultText = ''pkgs.writeText "log4j.properties" cfg.log4jProperties'';
     };
 
     formatLogDirs = mkOption {
-      description = lib.mdDoc ''
+      description = ''
         Whether to format log dirs in KRaft mode if all log dirs are
         unformatted, ie. they contain no meta.properties.
       '';
@@ -110,7 +110,7 @@ in {
     };
 
     formatLogDirsIgnoreFormatted = mkOption {
-      description = lib.mdDoc ''
+      description = ''
         Whether to ignore already formatted log dirs when formatting log dirs,
         instead of failing. Useful when replacing or adding disks.
       '';
@@ -119,7 +119,7 @@ in {
     };
 
     log4jProperties = mkOption {
-      description = lib.mdDoc "Kafka log4j property configuration.";
+      description = "Kafka log4j property configuration.";
       default = ''
         log4j.rootLogger=INFO, stdout
 
@@ -131,7 +131,7 @@ in {
     };
 
     jvmOptions = mkOption {
-      description = lib.mdDoc "Extra command line options for the JVM running Kafka.";
+      description = "Extra command line options for the JVM running Kafka.";
       default = [];
       type = types.listOf types.str;
       example = [
@@ -144,7 +144,7 @@ in {
     package = mkPackageOption pkgs "apacheKafka" { };
 
     jre = mkOption {
-      description = lib.mdDoc "The JRE with which to run Kafka";
+      description = "The JRE with which to run Kafka";
       default = cfg.package.passthru.jre;
       defaultText = literalExpression "pkgs.apacheKafka.passthru.jre";
       type = types.package;
diff --git a/nixpkgs/nixos/modules/services/misc/atuin.nix b/nixpkgs/nixos/modules/services/misc/atuin.nix
index 7e89929884d6..79c2c2a171e8 100644
--- a/nixpkgs/nixos/modules/services/misc/atuin.nix
+++ b/nixpkgs/nixos/modules/services/misc/atuin.nix
@@ -1,63 +1,63 @@
 { config, pkgs, lib, ... }:
 let
-  inherit (lib) mkOption types mdDoc mkIf;
+  inherit (lib) mkOption types mkIf;
   cfg = config.services.atuin;
 in
 {
   options = {
     services.atuin = {
-      enable = lib.mkEnableOption (mdDoc "Atuin server for shell history sync");
+      enable = lib.mkEnableOption "Atuin server for shell history sync";
 
       package = lib.mkPackageOption pkgs "atuin" { };
 
       openRegistration = mkOption {
         type = types.bool;
         default = false;
-        description = mdDoc "Allow new user registrations with the atuin server.";
+        description = "Allow new user registrations with the atuin server.";
       };
 
       path = mkOption {
         type = types.str;
         default = "";
-        description = mdDoc "A path to prepend to all the routes of the server.";
+        description = "A path to prepend to all the routes of the server.";
       };
 
       host = mkOption {
         type = types.str;
         default = "127.0.0.1";
-        description = mdDoc "The host address the atuin server should listen on.";
+        description = "The host address the atuin server should listen on.";
       };
 
       maxHistoryLength = mkOption {
         type = types.int;
         default = 8192;
-        description = mdDoc "The max length of each history item the atuin server should store.";
+        description = "The max length of each history item the atuin server should store.";
       };
 
       port = mkOption {
         type = types.port;
         default = 8888;
-        description = mdDoc "The port the atuin server should listen on.";
+        description = "The port the atuin server should listen on.";
       };
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = mdDoc "Open ports in the firewall for the atuin server.";
+        description = "Open ports in the firewall for the atuin server.";
       };
 
       database = {
         createLocally = mkOption {
           type = types.bool;
           default = true;
-          description = mdDoc "Create the database and database user locally.";
+          description = "Create the database and database user locally.";
         };
 
         uri = mkOption {
           type = types.nullOr types.str;
           default = "postgresql:///atuin?host=/run/postgresql";
           example = "postgresql://atuin@localhost:5432/atuin";
-          description = mdDoc ''
+          description = ''
             URI to the database.
             Can be set to null in which case ATUIN_DB_URI should be set through an EnvironmentFile
           '';
diff --git a/nixpkgs/nixos/modules/services/misc/autofs.nix b/nixpkgs/nixos/modules/services/misc/autofs.nix
index 723b67e8bb6b..d94fae3edebf 100644
--- a/nixpkgs/nixos/modules/services/misc/autofs.nix
+++ b/nixpkgs/nixos/modules/services/misc/autofs.nix
@@ -21,7 +21,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Mount filesystems on demand. Unmount them automatically.
           You may also be interested in afuse.
         '';
@@ -46,7 +46,7 @@ in
             /auto file:''${mapConf}
           '''
         '';
-        description = lib.mdDoc ''
+        description = ''
           Contents of `/etc/auto.master` file. See {command}`auto.master(5)` and {command}`autofs(5)`.
         '';
       };
@@ -54,13 +54,13 @@ in
       timeout = mkOption {
         type = types.int;
         default = 600;
-        description = lib.mdDoc "Set the global minimum timeout, in seconds, until directories are unmounted";
+        description = "Set the global minimum timeout, in seconds, until directories are unmounted";
       };
 
       debug = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Pass -d and -7 to automount and write log to the system journal.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/autorandr.nix b/nixpkgs/nixos/modules/services/misc/autorandr.nix
index aa96acb61306..1dbfc4caa31d 100644
--- a/nixpkgs/nixos/modules/services/misc/autorandr.nix
+++ b/nixpkgs/nixos/modules/services/misc/autorandr.nix
@@ -27,7 +27,7 @@ let
     options = {
       fingerprint = mkOption {
         type = types.attrsOf types.str;
-        description = lib.mdDoc ''
+        description = ''
           Output name to EDID mapping.
           Use `autorandr --fingerprint` to get current setup values.
         '';
@@ -36,13 +36,13 @@ let
 
       config = mkOption {
         type = types.attrsOf configModule;
-        description = lib.mdDoc "Per output profile configuration.";
+        description = "Per output profile configuration.";
         default = { };
       };
 
       hooks = mkOption {
         type = hooksModule;
-        description = lib.mdDoc "Profile hook scripts.";
+        description = "Profile hook scripts.";
         default = { };
       };
     };
@@ -52,54 +52,54 @@ let
     options = {
       enable = mkOption {
         type = types.bool;
-        description = lib.mdDoc "Whether to enable the output.";
+        description = "Whether to enable the output.";
         default = true;
       };
 
       crtc = mkOption {
         type = types.nullOr types.ints.unsigned;
-        description = lib.mdDoc "Output video display controller.";
+        description = "Output video display controller.";
         default = null;
         example = 0;
       };
 
       primary = mkOption {
         type = types.bool;
-        description = lib.mdDoc "Whether output should be marked as primary";
+        description = "Whether output should be marked as primary";
         default = false;
       };
 
       position = mkOption {
         type = types.str;
-        description = lib.mdDoc "Output position";
+        description = "Output position";
         default = "";
         example = "5760x0";
       };
 
       mode = mkOption {
         type = types.str;
-        description = lib.mdDoc "Output resolution.";
+        description = "Output resolution.";
         default = "";
         example = "3840x2160";
       };
 
       rate = mkOption {
         type = types.str;
-        description = lib.mdDoc "Output framerate.";
+        description = "Output framerate.";
         default = "";
         example = "60.00";
       };
 
       gamma = mkOption {
         type = types.str;
-        description = lib.mdDoc "Output gamma configuration.";
+        description = "Output gamma configuration.";
         default = "";
         example = "1.0:0.909:0.833";
       };
 
       rotate = mkOption {
         type = types.nullOr (types.enum [ "normal" "left" "right" "inverted" ]);
-        description = lib.mdDoc "Output rotate configuration.";
+        description = "Output rotate configuration.";
         default = null;
         example = "left";
       };
@@ -114,7 +114,7 @@ let
             [ 0.0 0.0 1.0 ]
           ]
         '';
-        description = lib.mdDoc ''
+        description = ''
           Refer to
           {manpage}`xrandr(1)`
           for the documentation of the transform matrix.
@@ -123,7 +123,7 @@ let
 
       dpi = mkOption {
         type = types.nullOr types.ints.positive;
-        description = lib.mdDoc "Output DPI configuration.";
+        description = "Output DPI configuration.";
         default = null;
         example = 96;
       };
@@ -133,23 +133,23 @@ let
           options = {
             method = mkOption {
               type = types.enum [ "factor" "pixel" ];
-              description = lib.mdDoc "Output scaling method.";
+              description = "Output scaling method.";
               default = "factor";
               example = "pixel";
             };
 
             x = mkOption {
               type = types.either types.float types.ints.positive;
-              description = lib.mdDoc "Horizontal scaling factor/pixels.";
+              description = "Horizontal scaling factor/pixels.";
             };
 
             y = mkOption {
               type = types.either types.float types.ints.positive;
-              description = lib.mdDoc "Vertical scaling factor/pixels.";
+              description = "Vertical scaling factor/pixels.";
             };
           };
         });
-        description = lib.mdDoc ''
+        description = ''
           Output scale configuration.
 
           Either configure by pixels or a scaling factor. When using pixel method the
@@ -178,19 +178,19 @@ let
     options = {
       postswitch = mkOption {
         type = types.attrsOf hookType;
-        description = lib.mdDoc "Postswitch hook executed after mode switch.";
+        description = "Postswitch hook executed after mode switch.";
         default = { };
       };
 
       preswitch = mkOption {
         type = types.attrsOf hookType;
-        description = lib.mdDoc "Preswitch hook executed before mode switch.";
+        description = "Preswitch hook executed before mode switch.";
         default = { };
       };
 
       predetect = mkOption {
         type = types.attrsOf hookType;
-        description = lib.mdDoc ''
+        description = ''
           Predetect hook executed before autorandr attempts to run xrandr.
         '';
         default = { };
@@ -242,12 +242,12 @@ in {
   options = {
 
     services.autorandr = {
-      enable = mkEnableOption (lib.mdDoc "handling of hotplug and sleep events by autorandr");
+      enable = mkEnableOption "handling of hotplug and sleep events by autorandr";
 
       defaultTarget = mkOption {
         default = "default";
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           Fallback if no monitor layout can be detected. See the docs
           (https://github.com/phillipberndt/autorandr/blob/v1.0/README.md#how-to-use)
           for further reference.
@@ -257,12 +257,18 @@ in {
       ignoreLid = mkOption {
         default = false;
         type = types.bool;
-        description = lib.mdDoc "Treat outputs as connected even if their lids are closed";
+        description = "Treat outputs as connected even if their lids are closed";
+      };
+
+      matchEdid = mkOption {
+        default = false;
+        type = types.bool;
+        description = "Match displays based on edid instead of name";
       };
 
       hooks = mkOption {
         type = hooksModule;
-        description = lib.mdDoc "Global hook scripts";
+        description = "Global hook scripts";
         default = { };
         example = literalExpression ''
           {
@@ -292,7 +298,7 @@ in {
       };
       profiles = mkOption {
         type = types.attrsOf profileModule;
-        description = lib.mdDoc "Autorandr profiles specification.";
+        description = "Autorandr profiles specification.";
         default = { };
         example = literalExpression ''
           {
@@ -351,7 +357,8 @@ in {
             --batch \
             --change \
             --default ${cfg.defaultTarget} \
-            ${optionalString cfg.ignoreLid "--ignore-lid"}
+            ${optionalString cfg.ignoreLid "--ignore-lid"} \
+            ${optionalString cfg.matchEdid "--match-edid"}
         '';
         Type = "oneshot";
         RemainAfterExit = false;
diff --git a/nixpkgs/nixos/modules/services/misc/autosuspend.nix b/nixpkgs/nixos/modules/services/misc/autosuspend.nix
index 28dfa12105ec..a41ad43c4429 100644
--- a/nixpkgs/nixos/modules/services/misc/autosuspend.nix
+++ b/nixpkgs/nixos/modules/services/misc/autosuspend.nix
@@ -1,7 +1,7 @@
 { config, pkgs, lib, ... }:
 let
   inherit (lib) mapAttrs' nameValuePair filterAttrs types mkEnableOption
-    mdDoc mkPackageOption mkOption literalExpression mkIf flatten
+    mkPackageOption mkOption literalExpression mkIf flatten
     maintainers attrValues;
 
   cfg = config.services.autosuspend;
@@ -38,7 +38,7 @@ let
   checkType = types.submodule {
     freeformType = settingsFormat.type.nestedTypes.elemType;
 
-    options.enabled = mkEnableOption (mdDoc "this activity check") // { default = true; };
+    options.enabled = mkEnableOption "this activity check" // { default = true; };
 
     options.class = mkOption {
       default = null;
@@ -61,7 +61,7 @@ let
         "XIdleTime"
         "XPath"
       ]);
-      description = mdDoc ''
+      description = ''
         Name of the class implementing the check.  If this option is not specified, the check's
         name must represent a valid internal check class.
       '';
@@ -71,7 +71,7 @@ let
   wakeupType = types.submodule {
     freeformType = settingsFormat.type.nestedTypes.elemType;
 
-    options.enabled = mkEnableOption (mdDoc "this wake-up check") // { default = true; };
+    options.enabled = mkEnableOption "this wake-up check" // { default = true; };
 
     options.class = mkOption {
       default = null;
@@ -84,7 +84,7 @@ let
         "XPath"
         "XPathDelta"
       ]);
-      description = mdDoc ''
+      description = ''
         Name of the class implementing the check.  If this option is not specified, the check's
         name must represent a valid internal check class.
       '';
@@ -94,7 +94,7 @@ in
 {
   options = {
     services.autosuspend = {
-      enable = mkEnableOption (mdDoc "the autosuspend daemon");
+      enable = mkEnableOption "the autosuspend daemon";
 
       package = mkPackageOption pkgs "autosuspend" { };
 
@@ -107,7 +107,7 @@ in
             suspend_cmd = mkOption {
               default = "systemctl suspend";
               type = with types; str;
-              description = mdDoc ''
+              description = ''
                 The command to execute in case the host shall be suspended. This line can contain
                 additional command line arguments to the command to execute.
               '';
@@ -115,7 +115,7 @@ in
             wakeup_cmd = mkOption {
               default = ''sh -c 'echo 0 > /sys/class/rtc/rtc0/wakealarm && echo {timestamp:.0f} > /sys/class/rtc/rtc0/wakealarm' '';
               type = with types; str;
-              description = mdDoc ''
+              description = ''
                 The command to execute for scheduling a wake up of the system. The given string is
                 processed using Python’s `str.format()` and a format argument called `timestamp`
                 encodes the UTC timestamp of the planned wake up time (float). Additionally `iso`
@@ -132,7 +132,7 @@ in
             idle_time = 120;
           }
         '';
-        description = mdDoc ''
+        description = ''
           Configuration for autosuspend, see
           <https://autosuspend.readthedocs.io/en/latest/configuration_file.html#general-configuration>
           for supported values.
@@ -142,7 +142,7 @@ in
       checks = mkOption {
         default = { };
         type = with types; attrsOf checkType;
-        description = mdDoc ''
+        description = ''
           Checks for activity.  For more information, see:
            - <https://autosuspend.readthedocs.io/en/latest/configuration_file.html#activity-check-configuration>
            - <https://autosuspend.readthedocs.io/en/latest/available_checks.html>
@@ -184,7 +184,7 @@ in
       wakeups = mkOption {
         default = { };
         type = with types; attrsOf wakeupType;
-        description = mdDoc ''
+        description = ''
           Checks for wake up.  For more information, see:
            - <https://autosuspend.readthedocs.io/en/latest/configuration_file.html#wake-up-check-configuration>
            - <https://autosuspend.readthedocs.io/en/latest/available_wakeups.html>
diff --git a/nixpkgs/nixos/modules/services/misc/bazarr.nix b/nixpkgs/nixos/modules/services/misc/bazarr.nix
index 07c935053591..99343a146a7a 100644
--- a/nixpkgs/nixos/modules/services/misc/bazarr.nix
+++ b/nixpkgs/nixos/modules/services/misc/bazarr.nix
@@ -8,30 +8,30 @@ in
 {
   options = {
     services.bazarr = {
-      enable = mkEnableOption (lib.mdDoc "bazarr, a subtitle manager for Sonarr and Radarr");
+      enable = mkEnableOption "bazarr, a subtitle manager for Sonarr and Radarr";
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Open ports in the firewall for the bazarr web interface.";
+        description = "Open ports in the firewall for the bazarr web interface.";
       };
 
       listenPort = mkOption {
         type = types.port;
         default = 6767;
-        description = lib.mdDoc "Port on which the bazarr web interface should listen";
+        description = "Port on which the bazarr web interface should listen";
       };
 
       user = mkOption {
         type = types.str;
         default = "bazarr";
-        description = lib.mdDoc "User account under which bazarr runs.";
+        description = "User account under which bazarr runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "bazarr";
-        description = lib.mdDoc "Group under which bazarr runs.";
+        description = "Group under which bazarr runs.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/bcg.nix b/nixpkgs/nixos/modules/services/misc/bcg.nix
index ad0b9c871342..626a67f66d08 100644
--- a/nixpkgs/nixos/modules/services/misc/bcg.nix
+++ b/nixpkgs/nixos/modules/services/misc/bcg.nix
@@ -25,13 +25,13 @@ in
 {
   options = {
     services.bcg = {
-      enable = mkEnableOption (mdDoc "BigClown gateway");
+      enable = mkEnableOption "BigClown gateway";
       package = mkPackageOption pkgs [ "python3Packages" "bcg" ] { };
       environmentFiles = mkOption {
         type = types.listOf types.path;
         default = [];
         example = [ "/run/keys/bcg.env" ];
-        description = mdDoc ''
+        description = ''
           File to load as environment file. Environment variables from this file
           will be interpolated into the config file using envsubst with this
           syntax: `$ENVIRONMENT` or `''${VARIABLE}`.
@@ -41,16 +41,16 @@ in
       verbose = mkOption {
         type = types.enum ["CRITICAL" "ERROR" "WARNING" "INFO" "DEBUG"];
         default = "WARNING";
-        description = mdDoc "Verbosity level.";
+        description = "Verbosity level.";
       };
       device = mkOption {
         type = types.str;
-        description = mdDoc "Device name to configure gateway to use.";
+        description = "Device name to configure gateway to use.";
       };
       name = mkOption {
         type = with types; nullOr str;
         default = null;
-        description = mdDoc ''
+        description = ''
           Name for the device.
 
           Supported variables:
@@ -64,78 +64,78 @@ in
         host = mkOption {
           type = types.str;
           default = "127.0.0.1";
-          description = mdDoc "Host where MQTT server is running.";
+          description = "Host where MQTT server is running.";
         };
         port = mkOption {
           type = types.port;
           default = 1883;
-          description = mdDoc "Port of MQTT server.";
+          description = "Port of MQTT server.";
         };
         username = mkOption {
           type = with types; nullOr str;
           default = null;
-          description = mdDoc "MQTT server access username.";
+          description = "MQTT server access username.";
         };
         password = mkOption {
           type = with types; nullOr str;
           default = null;
-          description = mdDoc "MQTT server access password.";
+          description = "MQTT server access password.";
         };
         cafile = mkOption {
           type = with types; nullOr str;
           default = null;
-          description = mdDoc "Certificate Authority file for MQTT server access.";
+          description = "Certificate Authority file for MQTT server access.";
         };
         certfile = mkOption {
           type = with types; nullOr str;
           default = null;
-          description = mdDoc "Certificate file for MQTT server access.";
+          description = "Certificate file for MQTT server access.";
         };
         keyfile = mkOption {
           type = with types; nullOr str;
           default = null;
-          description = mdDoc "Key file for MQTT server access.";
+          description = "Key file for MQTT server access.";
         };
       };
       retainNodeMessages = mkOption {
         type = types.bool;
         default = false;
-        description = mdDoc "Specify that node messages should be retaied in MQTT broker.";
+        description = "Specify that node messages should be retaied in MQTT broker.";
       };
       qosNodeMessages = mkOption {
         type = types.int;
         default = 1;
-        description = mdDoc "Set the guarantee of MQTT message delivery.";
+        description = "Set the guarantee of MQTT message delivery.";
       };
       baseTopicPrefix = mkOption {
         type = types.str;
         default = "";
-        description = mdDoc "Topic prefix added to all MQTT messages.";
+        description = "Topic prefix added to all MQTT messages.";
       };
       automaticRemoveKitFromNames = mkOption {
         type = types.bool;
         default = true;
-        description = mdDoc "Automatically remove kits.";
+        description = "Automatically remove kits.";
       };
       automaticRenameKitNodes = mkOption {
         type = types.bool;
         default = true;
-        description = mdDoc "Automatically rename kit's nodes.";
+        description = "Automatically rename kit's nodes.";
       };
       automaticRenameGenericNodes = mkOption {
         type = types.bool;
         default = true;
-        description = mdDoc "Automatically rename generic nodes.";
+        description = "Automatically rename generic nodes.";
       };
       automaticRenameNodes = mkOption {
         type = types.bool;
         default = true;
-        description = mdDoc "Automatically rename all nodes.";
+        description = "Automatically rename all nodes.";
       };
       rename = mkOption {
         type = with types; attrsOf str;
         default = {};
-        description = mdDoc "Rename nodes to different name.";
+        description = "Rename nodes to different name.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/beanstalkd.nix b/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
index 4262cae323b9..b8f163cbfadf 100644
--- a/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
+++ b/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
@@ -12,18 +12,18 @@ in
 
   options = {
     services.beanstalkd = {
-      enable = mkEnableOption (lib.mdDoc "the Beanstalk work queue");
+      enable = mkEnableOption "the Beanstalk work queue";
 
       listen = {
         port = mkOption {
           type = types.port;
-          description = lib.mdDoc "TCP port that will be used to accept client connections.";
+          description = "TCP port that will be used to accept client connections.";
           default = 11300;
         };
 
         address = mkOption {
           type = types.str;
-          description = lib.mdDoc "IP address to listen on.";
+          description = "IP address to listen on.";
           default = "127.0.0.1";
           example = "0.0.0.0";
         };
@@ -32,7 +32,7 @@ in
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to open ports in the firewall for the server.";
+        description = "Whether to open ports in the firewall for the server.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/bees.nix b/nixpkgs/nixos/modules/services/misc/bees.nix
index 37f90c682221..a0fd3cd43d62 100644
--- a/nixpkgs/nixos/modules/services/misc/bees.nix
+++ b/nixpkgs/nixos/modules/services/misc/bees.nix
@@ -11,7 +11,7 @@ let
   fsOptions = with types; {
     options.spec = mkOption {
       type = str;
-      description = lib.mdDoc ''
+      description = ''
         Description of how to identify the filesystem to be duplicated by this
         instance of bees. Note that deduplication crosses subvolumes; one must
         not configure multiple instances for subvolumes of the same filesystem
@@ -28,7 +28,7 @@ let
     options.hashTableSizeMB = mkOption {
       type = types.addCheck types.int (n: mod n 16 == 0);
       default = 1024; # 1GB; default from upstream beesd script
-      description = lib.mdDoc ''
+      description = ''
         Hash table size in MB; must be a multiple of 16.
 
         A larger ratio of index size to storage size means smaller blocks of
@@ -44,12 +44,12 @@ let
       type = types.enum (attrNames logLevels ++ attrValues logLevels);
       apply = v: if isString v then logLevels.${v} else v;
       default = "info";
-      description = lib.mdDoc "Log verbosity (syslog keyword/level).";
+      description = "Log verbosity (syslog keyword/level).";
     };
     options.workDir = mkOption {
       type = str;
       default = ".beeshome";
-      description = lib.mdDoc ''
+      description = ''
         Name (relative to the root of the filesystem) of the subvolume where
         the hash table will be stored.
       '';
@@ -57,7 +57,7 @@ let
     options.extraOptions = mkOption {
       type = listOf str;
       default = [ ];
-      description = lib.mdDoc ''
+      description = ''
         Extra command-line options passed to the daemon. See upstream bees documentation.
       '';
       example = literalExpression ''
@@ -72,7 +72,7 @@ in
   options.services.beesd = {
     filesystems = mkOption {
       type = with types; attrsOf (submodule fsOptions);
-      description = lib.mdDoc "BTRFS filesystems to run block-level deduplication on.";
+      description = "BTRFS filesystems to run block-level deduplication on.";
       default = { };
       example = literalExpression ''
         {
diff --git a/nixpkgs/nixos/modules/services/misc/bepasty.nix b/nixpkgs/nixos/modules/services/misc/bepasty.nix
index 70d07629493b..fad4827c6650 100644
--- a/nixpkgs/nixos/modules/services/misc/bepasty.nix
+++ b/nixpkgs/nixos/modules/services/misc/bepasty.nix
@@ -13,11 +13,11 @@ let
 in
 {
   options.services.bepasty = {
-    enable = mkEnableOption (lib.mdDoc "Bepasty servers");
+    enable = mkEnableOption "bepasty, a binary pastebin server";
 
     servers = mkOption {
       default = {};
-      description = lib.mdDoc ''
+      description = ''
         configure a number of bepasty servers which will be started with
         gunicorn.
         '';
@@ -27,7 +27,7 @@ in
 
           bind = mkOption {
             type = types.str;
-            description = lib.mdDoc ''
+            description = ''
               Bind address to be used for this server.
               '';
             example = "0.0.0.0:8000";
@@ -36,7 +36,7 @@ in
 
           dataDir = mkOption {
             type = types.str;
-            description = lib.mdDoc ''
+            description = ''
               Path to the directory where the pastes will be saved to
               '';
             default = default_home+"/data";
@@ -44,7 +44,7 @@ in
 
           defaultPermissions = mkOption {
             type = types.str;
-            description = lib.mdDoc ''
+            description = ''
               default permissions for all unauthenticated accesses.
               '';
             example = "read,create,delete";
@@ -53,7 +53,7 @@ in
 
           extraConfig = mkOption {
             type = types.lines;
-            description = lib.mdDoc ''
+            description = ''
               Extra configuration for bepasty server to be appended on the
               configuration.
               see https://bepasty-server.readthedocs.org/en/latest/quickstart.html#configuring-bepasty
@@ -70,7 +70,7 @@ in
 
           secretKey = mkOption {
             type = types.str;
-            description = lib.mdDoc ''
+            description = ''
               server secret for safe session cookies, must be set.
 
               Warning: this secret is stored in the WORLD-READABLE Nix store!
@@ -84,7 +84,7 @@ in
           secretKeyFile = mkOption {
             type = types.nullOr types.str;
             default = null;
-            description = lib.mdDoc ''
+            description = ''
               A file that contains the server secret for safe session cookies, must be set.
 
               {option}`secretKeyFile` takes precedence over {option}`secretKey`.
@@ -96,7 +96,7 @@ in
 
           workDir = mkOption {
             type = types.str;
-            description = lib.mdDoc ''
+            description = ''
               Path to the working directory (used for config and pidfile).
               Defaults to the users home directory.
               '';
diff --git a/nixpkgs/nixos/modules/services/misc/calibre-server.nix b/nixpkgs/nixos/modules/services/misc/calibre-server.nix
index 66ae5fa91bb6..8e2ce2909239 100644
--- a/nixpkgs/nixos/modules/services/misc/calibre-server.nix
+++ b/nixpkgs/nixos/modules/services/misc/calibre-server.nix
@@ -32,13 +32,13 @@ in
   options = {
     services.calibre-server = {
 
-      enable = mkEnableOption (lib.mdDoc "calibre-server");
+      enable = mkEnableOption "calibre-server (e-book software)";
       package = lib.mkPackageOption pkgs "calibre" { };
 
       libraries = mkOption {
         type = types.listOf types.path;
         default = [ "/var/lib/calibre-server" ];
-        description = lib.mdDoc ''
+        description = ''
           Make sure each library path is initialized before service startup.
           The directories of the libraries to serve. They must be readable for the user under which the server runs.
           See the [calibredb documentation](${documentationLink}/generated/en/calibredb.html#add) for details.
@@ -48,20 +48,20 @@ in
       user = mkOption {
         type = types.str;
         default = "calibre-server";
-        description = lib.mdDoc "The user under which calibre-server runs.";
+        description = "The user under which calibre-server runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "calibre-server";
-        description = lib.mdDoc "The group under which calibre-server runs.";
+        description = "The group under which calibre-server runs.";
       };
 
       host = mkOption {
         type = types.str;
         default = "0.0.0.0";
         example = "::1";
-        description = lib.mdDoc ''
+        description = ''
           The interface on which to listen for connections.
           See the [calibre-server documentation](${generatedDocumentationLink}#cmdoption-calibre-server-listen-on) for details.
         '';
@@ -70,7 +70,7 @@ in
       port = mkOption {
         default = 8080;
         type = types.port;
-        description = lib.mdDoc ''
+        description = ''
           The port on which to listen for connections.
           See the [calibre-server documentation](${generatedDocumentationLink}#cmdoption-calibre-server-port) for details.
         '';
@@ -80,7 +80,7 @@ in
         enable = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc ''
+          description = ''
             Password based authentication to access the server.
             See the [calibre-server documentation](${generatedDocumentationLink}#cmdoption-calibre-server-enable-auth) for details.
           '';
@@ -89,7 +89,7 @@ in
         mode = mkOption {
           type = types.enum [ "auto" "basic" "digest" ];
           default = "auto";
-          description = lib.mdDoc ''
+          description = ''
             Choose the type of authentication used.
             Set the HTTP authentication mode used by the server.
             See the [calibre-server documentation](${generatedDocumentationLink}#cmdoption-calibre-server-auth-mode) for details.
@@ -99,7 +99,7 @@ in
         userDb = mkOption {
           default = null;
           type = types.nullOr types.path;
-          description = lib.mdDoc ''
+          description = ''
             Choose users database file to use for authentication.
             Make sure users database file is initialized before service startup.
             See the [calibre-server documentation](${documentationLink}/server.html#managing-user-accounts-from-the-command-line-only) for details.
diff --git a/nixpkgs/nixos/modules/services/misc/canto-daemon.nix b/nixpkgs/nixos/modules/services/misc/canto-daemon.nix
index 8150e038bc13..db51a263aab5 100644
--- a/nixpkgs/nixos/modules/services/misc/canto-daemon.nix
+++ b/nixpkgs/nixos/modules/services/misc/canto-daemon.nix
@@ -16,7 +16,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to enable the canto RSS daemon.";
+        description = "Whether to enable the canto RSS daemon.";
       };
     };
 
diff --git a/nixpkgs/nixos/modules/services/misc/cfdyndns.nix b/nixpkgs/nixos/modules/services/misc/cfdyndns.nix
index dba8ac200151..506e5f7613c0 100644
--- a/nixpkgs/nixos/modules/services/misc/cfdyndns.nix
+++ b/nixpkgs/nixos/modules/services/misc/cfdyndns.nix
@@ -14,11 +14,11 @@ in
 
   options = {
     services.cfdyndns = {
-      enable = mkEnableOption (lib.mdDoc "Cloudflare Dynamic DNS Client");
+      enable = mkEnableOption "Cloudflare Dynamic DNS Client";
 
       email = mkOption {
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           The email address to use to authenticate to CloudFlare.
         '';
       };
@@ -26,7 +26,7 @@ in
       apiTokenFile = mkOption {
         default = null;
         type = types.nullOr types.str;
-        description = lib.mdDoc ''
+        description = ''
           The path to a file containing the API Token
           used to authenticate with CloudFlare.
         '';
@@ -35,7 +35,7 @@ in
       apikeyFile = mkOption {
         default = null;
         type = types.nullOr types.str;
-        description = lib.mdDoc ''
+        description = ''
           The path to a file containing the API Key
           used to authenticate with CloudFlare.
         '';
@@ -45,7 +45,7 @@ in
         default = [];
         example = [ "host.tld" ];
         type = types.listOf types.str;
-        description = lib.mdDoc ''
+        description = ''
           The records to update in CloudFlare.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/cgminer.nix b/nixpkgs/nixos/modules/services/misc/cgminer.nix
index ad6cbf50918d..dd857124b226 100644
--- a/nixpkgs/nixos/modules/services/misc/cgminer.nix
+++ b/nixpkgs/nixos/modules/services/misc/cgminer.nix
@@ -31,20 +31,20 @@ in
 
     services.cgminer = {
 
-      enable = mkEnableOption (lib.mdDoc "cgminer, an ASIC/FPGA/GPU miner for bitcoin and litecoin");
+      enable = mkEnableOption "cgminer, an ASIC/FPGA/GPU miner for bitcoin and litecoin";
 
       package = mkPackageOption pkgs "cgminer" { };
 
       user = mkOption {
         type = types.str;
         default = "cgminer";
-        description = lib.mdDoc "User account under which cgminer runs";
+        description = "User account under which cgminer runs";
       };
 
       pools = mkOption {
         default = [];  # Run benchmark
         type = types.listOf (types.attrsOf types.str);
-        description = lib.mdDoc "List of pools where to mine";
+        description = "List of pools where to mine";
         example = [{
           url = "http://p2pool.org:9332";
           username = "17EUZxTvs9uRmPsjPZSYUU3zCz9iwstudk";
@@ -55,7 +55,7 @@ in
       hardware = mkOption {
         default = []; # Run without options
         type = types.listOf (types.attrsOf (types.either types.str types.int));
-        description= lib.mdDoc "List of config options for every GPU";
+        description= "List of config options for every GPU";
         example = [
         {
           intensity = 9;
@@ -82,7 +82,7 @@ in
       config = mkOption {
         default = {};
         type = types.attrsOf (types.either types.bool types.int);
-        description = lib.mdDoc "Additional config";
+        description = "Additional config";
         example = {
           auto-fan = true;
           auto-gpu = true;
diff --git a/nixpkgs/nixos/modules/services/misc/clipcat.nix b/nixpkgs/nixos/modules/services/misc/clipcat.nix
index fb6442709530..fa608e73c7d6 100644
--- a/nixpkgs/nixos/modules/services/misc/clipcat.nix
+++ b/nixpkgs/nixos/modules/services/misc/clipcat.nix
@@ -7,7 +7,7 @@ let
 in {
 
   options.services.clipcat= {
-    enable = mkEnableOption (lib.mdDoc "Clipcat clipboard daemon");
+    enable = mkEnableOption "Clipcat clipboard daemon";
 
     package = mkPackageOption pkgs "clipcat" { };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/clipmenu.nix b/nixpkgs/nixos/modules/services/misc/clipmenu.nix
index 343167b1df2e..71d36f9ef130 100644
--- a/nixpkgs/nixos/modules/services/misc/clipmenu.nix
+++ b/nixpkgs/nixos/modules/services/misc/clipmenu.nix
@@ -7,7 +7,7 @@ let
 in {
 
   options.services.clipmenu = {
-    enable = mkEnableOption (lib.mdDoc "clipmenu, the clipboard management daemon");
+    enable = mkEnableOption "clipmenu, the clipboard management daemon";
 
     package = mkPackageOption pkgs "clipmenu" { };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/confd.nix b/nixpkgs/nixos/modules/services/misc/confd.nix
index 93731547ede8..836a1119a577 100644
--- a/nixpkgs/nixos/modules/services/misc/confd.nix
+++ b/nixpkgs/nixos/modules/services/misc/confd.nix
@@ -17,46 +17,46 @@ let
 
 in {
   options.services.confd = {
-    enable = mkEnableOption (lib.mdDoc "confd service");
+    enable = mkEnableOption "confd, a service to manage local application configuration files using templates and data from etcd/consul/redis/zookeeper";
 
     backend = mkOption {
-      description = lib.mdDoc "Confd config storage backend to use.";
+      description = "Confd config storage backend to use.";
       default = "etcd";
       type = types.enum ["etcd" "consul" "redis" "zookeeper"];
     };
 
     interval = mkOption {
-      description = lib.mdDoc "Confd check interval.";
+      description = "Confd check interval.";
       default = 10;
       type = types.int;
     };
 
     nodes = mkOption {
-      description = lib.mdDoc "Confd list of nodes to connect to.";
+      description = "Confd list of nodes to connect to.";
       default = [ "http://127.0.0.1:2379" ];
       type = types.listOf types.str;
     };
 
     watch = mkOption {
-      description = lib.mdDoc "Confd, whether to watch etcd config for changes.";
+      description = "Confd, whether to watch etcd config for changes.";
       default = true;
       type = types.bool;
     };
 
     prefix = mkOption {
-      description = lib.mdDoc "The string to prefix to keys.";
+      description = "The string to prefix to keys.";
       default = "/";
       type = types.path;
     };
 
     logLevel = mkOption {
-      description = lib.mdDoc "Confd log level.";
+      description = "Confd log level.";
       default = "info";
       type = types.enum ["info" "debug"];
     };
 
     confDir = mkOption {
-      description = lib.mdDoc "The path to the confd configs.";
+      description = "The path to the confd configs.";
       default = "/etc/confd";
       type = types.path;
     };
diff --git a/nixpkgs/nixos/modules/services/misc/cpuminer-cryptonight.nix b/nixpkgs/nixos/modules/services/misc/cpuminer-cryptonight.nix
index 7b18c6b3cd20..907b9d90da29 100644
--- a/nixpkgs/nixos/modules/services/misc/cpuminer-cryptonight.nix
+++ b/nixpkgs/nixos/modules/services/misc/cpuminer-cryptonight.nix
@@ -23,27 +23,27 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable the cpuminer cryptonight miner.
         '';
       };
       url = mkOption {
         type = types.str;
-        description = lib.mdDoc "URL of mining server";
+        description = "URL of mining server";
       };
       user = mkOption {
         type = types.str;
-        description = lib.mdDoc "Username for mining server";
+        description = "Username for mining server";
       };
       pass = mkOption {
         type = types.str;
         default = "x";
-        description = lib.mdDoc "Password for mining server";
+        description = "Password for mining server";
       };
       threads = mkOption {
         type = types.int;
         default = 0;
-        description = lib.mdDoc "Number of miner threads, defaults to available processors";
+        description = "Number of miner threads, defaults to available processors";
       };
     };
 
diff --git a/nixpkgs/nixos/modules/services/misc/db-rest.nix b/nixpkgs/nixos/modules/services/misc/db-rest.nix
new file mode 100644
index 000000000000..fbf8b327af04
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/misc/db-rest.nix
@@ -0,0 +1,182 @@
+{ config, pkgs, lib, ... }:
+let
+  inherit (lib) mkOption types mkIf mkMerge mkDefault mkEnableOption mkPackageOption maintainers;
+  cfg = config.services.db-rest;
+in
+{
+  options = {
+    services.db-rest = {
+      enable = mkEnableOption "db-rest service";
+
+      user = mkOption {
+        type = types.str;
+        default = "db-rest";
+        description = "User account under which db-rest runs.";
+      };
+
+      group = mkOption {
+        type = types.str;
+        default = "db-rest";
+        description = "Group under which db-rest runs.";
+      };
+
+      host = mkOption {
+        type = types.str;
+        default = "127.0.0.1";
+        description = "The host address the db-rest server should listen on.";
+      };
+
+      port = mkOption {
+        type = types.port;
+        default = 3000;
+        description = "The port the db-rest server should listen on.";
+      };
+
+      redis = {
+        enable = mkOption {
+          type = types.bool;
+          default = false;
+          description = "Enable caching with redis for db-rest.";
+        };
+
+        createLocally = mkOption {
+          type = types.bool;
+          default = true;
+          description = "Configure a local redis server for db-rest.";
+        };
+
+        host = mkOption {
+          type = with types; nullOr str;
+          default = null;
+          description = "Redis host.";
+        };
+
+        port = mkOption {
+          type = with types; nullOr port;
+          default = null;
+          description = "Redis port.";
+        };
+
+        user = mkOption {
+          type = with types; nullOr str;
+          default = null;
+          description = "Optional username used for authentication with redis.";
+        };
+
+        passwordFile = mkOption {
+          type = with types; nullOr path;
+          default = null;
+          example = "/run/keys/db-rest/pasword-redis-db";
+          description = "Path to a file containing the redis password.";
+        };
+
+        useSSL = mkOption {
+          type = types.bool;
+          default = true;
+          description = "Use SSL if using a redis network connection.";
+        };
+      };
+
+      package = mkPackageOption pkgs "db-rest" { };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    assertions = [
+      {
+        assertion = (cfg.redis.enable && !cfg.redis.createLocally) -> (cfg.redis.host != null && cfg.redis.port != null);
+        message = ''
+          {option}`services.db-rest.redis.createLocally` and redis network connection ({option}`services.db-rest.redis.host` or {option}`services.db-rest.redis.port`) enabled. Disable either of them.
+        '';
+      }
+      {
+        assertion = (cfg.redis.enable && !cfg.redis.createLocally) -> (cfg.redis.passwordFile != null);
+        message = ''
+          {option}`services.db-rest.redis.createLocally` is disabled, but {option}`services.db-rest.redis.passwordFile` is not set.
+        '';
+      }
+    ];
+
+    systemd.services.db-rest = mkMerge [
+      {
+        description = "db-rest service";
+        after = [ "network.target" ]
+          ++ lib.optional cfg.redis.createLocally "redis-db-rest.service";
+        requires = lib.optional cfg.redis.createLocally "redis-db-rest.service";
+        wantedBy = [ "multi-user.target" ];
+        serviceConfig = {
+          Type = "simple";
+          Restart = "always";
+          RestartSec = 5;
+          WorkingDirectory = cfg.package;
+          User = cfg.user;
+          Group = cfg.group;
+          RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ];
+          MemoryDenyWriteExecute = false;
+          LoadCredential = lib.optional (cfg.redis.enable && cfg.redis.passwordFile != null) "REDIS_PASSWORD:${cfg.redis.passwordFile}";
+          ExecStart = mkDefault "${cfg.package}/bin/db-rest";
+
+          RemoveIPC = true;
+          NoNewPrivileges = true;
+          PrivateDevices = true;
+          ProtectClock = true;
+          ProtectKernelLogs = true;
+          ProtectControlGroups = true;
+          ProtectKernelModules = true;
+          PrivateMounts = true;
+          SystemCallArchitectures = "native";
+          ProtectHostname = true;
+          LockPersonality = true;
+          ProtectKernelTunables = true;
+          RestrictRealtime = true;
+          RestrictSUIDSGID = true;
+          RestrictNamespaces = true;
+          ProtectSystem = "strict";
+          ProtectProc = "invisible";
+          ProcSubset = "pid";
+          ProtectHome = true;
+          PrivateUsers = true;
+          PrivateTmp = true;
+          CapabilityBoundingSet = "";
+        };
+        environment = {
+          NODE_ENV = "production";
+          NODE_EXTRA_CA_CERTS = "/etc/ssl/certs/ca-certificates.crt";
+          HOSTNAME = cfg.host;
+          PORT = toString cfg.port;
+        };
+      }
+      (mkIf cfg.redis.enable (if cfg.redis.createLocally then
+        { environment.REDIS_URL = config.services.redis.servers.db-rest.unixSocket; }
+      else
+        {
+          script =
+            let
+              username = lib.optionalString (cfg.redis.user != null) (cfg.redis.user);
+              host = cfg.redis.host;
+              port = toString cfg.redis.port;
+              protocol = if cfg.redis.useSSL then "rediss" else "redis";
+            in
+            ''
+              export REDIS_URL="${protocol}://${username}:$(${config.systemd.package}/bin/systemd-creds cat REDIS_PASSWORD)@${host}:${port}"
+              exec ${cfg.package}/bin/db-rest
+            '';
+        }))
+    ];
+
+    users.users = lib.mkMerge [
+      (lib.mkIf (cfg.user == "db-rest") {
+        db-rest = {
+          isSystemUser = true;
+          group = cfg.group;
+        };
+      })
+      (lib.mkIf cfg.redis.createLocally { ${cfg.user}.extraGroups = [ "redis-db-rest" ]; })
+    ];
+
+    users.groups = lib.mkIf (cfg.group == "db-rest") { db-rest = { }; };
+
+    services.redis.servers.db-rest.enable = cfg.redis.enable && cfg.redis.createLocally;
+  };
+  meta.maintainers = with maintainers; [ marie ];
+}
diff --git a/nixpkgs/nixos/modules/services/misc/devmon.nix b/nixpkgs/nixos/modules/services/misc/devmon.nix
index bd0b738b7018..e4a3348646b1 100644
--- a/nixpkgs/nixos/modules/services/misc/devmon.nix
+++ b/nixpkgs/nixos/modules/services/misc/devmon.nix
@@ -8,7 +8,7 @@ let
 in {
   options = {
     services.devmon = {
-      enable = mkEnableOption (lib.mdDoc "devmon, an automatic device mounting daemon");
+      enable = mkEnableOption "devmon, an automatic device mounting daemon";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/misc/dictd.nix b/nixpkgs/nixos/modules/services/misc/dictd.nix
index 4b714b84f3b2..8cb51bb0b7a7 100644
--- a/nixpkgs/nixos/modules/services/misc/dictd.nix
+++ b/nixpkgs/nixos/modules/services/misc/dictd.nix
@@ -17,7 +17,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable the DICT.org dictionary server.
         '';
       };
@@ -27,7 +27,7 @@ in
         default = with pkgs.dictdDBs; [ wiktionary wordnet ];
         defaultText = literalExpression "with pkgs.dictdDBs; [ wiktionary wordnet ]";
         example = literalExpression "[ pkgs.dictdDBs.nld2eng ]";
-        description = lib.mdDoc "List of databases to make available.";
+        description = "List of databases to make available.";
       };
 
     };
diff --git a/nixpkgs/nixos/modules/services/misc/disnix.nix b/nixpkgs/nixos/modules/services/misc/disnix.nix
index ee342cbc2e47..80e749204993 100644
--- a/nixpkgs/nixos/modules/services/misc/disnix.nix
+++ b/nixpkgs/nixos/modules/services/misc/disnix.nix
@@ -17,24 +17,24 @@ in
 
     services.disnix = {
 
-      enable = mkEnableOption (lib.mdDoc "Disnix");
+      enable = mkEnableOption "Disnix";
 
       enableMultiUser = mkOption {
         type = types.bool;
         default = true;
-        description = lib.mdDoc "Whether to support multi-user mode by enabling the Disnix D-Bus service";
+        description = "Whether to support multi-user mode by enabling the Disnix D-Bus service";
       };
 
-      useWebServiceInterface = mkEnableOption (lib.mdDoc "the DisnixWebService interface running on Apache Tomcat");
+      useWebServiceInterface = mkEnableOption "the DisnixWebService interface running on Apache Tomcat";
 
       package = mkPackageOption pkgs "disnix" {};
 
-      enableProfilePath = mkEnableOption (lib.mdDoc "exposing the Disnix profiles in the system's PATH");
+      enableProfilePath = mkEnableOption "exposing the Disnix profiles in the system's PATH";
 
       profiles = mkOption {
         type = types.listOf types.str;
         default = [ "default" ];
-        description = lib.mdDoc "Names of the Disnix profiles to expose in the system's PATH";
+        description = "Names of the Disnix profiles to expose in the system's PATH";
       };
     };
 
diff --git a/nixpkgs/nixos/modules/services/misc/docker-registry.nix b/nixpkgs/nixos/modules/services/misc/docker-registry.nix
index 78d1d6339ed6..93bf71ea3ecc 100644
--- a/nixpkgs/nixos/modules/services/misc/docker-registry.nix
+++ b/nixpkgs/nixos/modules/services/misc/docker-registry.nix
@@ -41,24 +41,23 @@ let
     };
   };
 
-  configFile = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig));
-
+  configFile = cfg.configFile;
 in {
   options.services.dockerRegistry = {
-    enable = mkEnableOption (lib.mdDoc "Docker Registry");
+    enable = mkEnableOption "Docker Registry";
 
     package = mkPackageOption pkgs "docker-distribution" {
       example = "gitlab-container-registry";
     };
 
     listenAddress = mkOption {
-      description = lib.mdDoc "Docker registry host or ip to bind to.";
+      description = "Docker registry host or ip to bind to.";
       default = "127.0.0.1";
       type = types.str;
     };
 
     port = mkOption {
-      description = lib.mdDoc "Docker registry port to bind to.";
+      description = "Docker registry port to bind to.";
       default = 5000;
       type = types.port;
     };
@@ -66,13 +65,13 @@ in {
     openFirewall = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Opens the port used by the firewall.";
+      description = "Opens the port used by the firewall.";
     };
 
     storagePath = mkOption {
       type = types.nullOr types.path;
       default = "/var/lib/docker-registry";
-      description = lib.mdDoc ''
+      description = ''
         Docker registry storage path for the filesystem storage backend. Set to
         null to configure another backend via extraConfig.
       '';
@@ -81,37 +80,48 @@ in {
     enableDelete = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Enable delete for manifests and blobs.";
+      description = "Enable delete for manifests and blobs.";
     };
 
-    enableRedisCache = mkEnableOption (lib.mdDoc "redis as blob cache");
+    enableRedisCache = mkEnableOption "redis as blob cache";
 
     redisUrl = mkOption {
       type = types.str;
       default = "localhost:6379";
-      description = lib.mdDoc "Set redis host and port.";
+      description = "Set redis host and port.";
     };
 
     redisPassword = mkOption {
       type = types.str;
       default = "";
-      description = lib.mdDoc "Set redis password.";
+      description = "Set redis password.";
     };
 
     extraConfig = mkOption {
-      description = lib.mdDoc ''
+      description = ''
         Docker extra registry configuration via environment variables.
       '';
       default = {};
       type = types.attrs;
     };
 
-    enableGarbageCollect = mkEnableOption (lib.mdDoc "garbage collect");
+    configFile = lib.mkOption {
+      default = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig));
+      defaultText = literalExpression ''pkgs.writeText "docker-registry-config.yml" "# my custom docker-registry-config.yml ..."'';
+      description = ''
+       Path to CNCF distribution config file.
+
+       Setting this option will override any configuration applied by the extraConfig option.
+      '';
+      type =  types.path;
+    };
+
+    enableGarbageCollect = mkEnableOption "garbage collect";
 
     garbageCollectDates = mkOption {
       default = "daily";
       type = types.str;
-      description = lib.mdDoc ''
+      description = ''
         Specification (in the format described by
         {manpage}`systemd.time(7)`) of the time at
         which the garbage collect will occur.
diff --git a/nixpkgs/nixos/modules/services/misc/domoticz.nix b/nixpkgs/nixos/modules/services/misc/domoticz.nix
index 315092f93351..52443f49f7b3 100644
--- a/nixpkgs/nixos/modules/services/misc/domoticz.nix
+++ b/nixpkgs/nixos/modules/services/misc/domoticz.nix
@@ -12,18 +12,18 @@ in {
   options = {
 
     services.domoticz = {
-      enable = mkEnableOption (lib.mdDoc pkgDesc);
+      enable = mkEnableOption pkgDesc;
 
       bind = mkOption {
         type = types.str;
         default = "0.0.0.0";
-        description = lib.mdDoc "IP address to bind to.";
+        description = "IP address to bind to.";
       };
 
       port = mkOption {
         type = types.port;
         default = 8080;
-        description = lib.mdDoc "Port to bind to for HTTP, set to 0 to disable HTTP.";
+        description = "Port to bind to for HTTP, set to 0 to disable HTTP.";
       };
 
     };
diff --git a/nixpkgs/nixos/modules/services/misc/duckling.nix b/nixpkgs/nixos/modules/services/misc/duckling.nix
index 4d06ca7fa667..77d2a92380b0 100644
--- a/nixpkgs/nixos/modules/services/misc/duckling.nix
+++ b/nixpkgs/nixos/modules/services/misc/duckling.nix
@@ -7,12 +7,12 @@ let
 in {
   options = {
     services.duckling = {
-      enable = mkEnableOption (lib.mdDoc "duckling");
+      enable = mkEnableOption "duckling";
 
       port = mkOption {
         type = types.port;
         default = 8080;
-        description = lib.mdDoc ''
+        description = ''
           Port on which duckling will run.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/dwm-status.nix b/nixpkgs/nixos/modules/services/misc/dwm-status.nix
index 351adf31d922..081451f2ace9 100644
--- a/nixpkgs/nixos/modules/services/misc/dwm-status.nix
+++ b/nixpkgs/nixos/modules/services/misc/dwm-status.nix
@@ -22,7 +22,7 @@ in
 
     services.dwm-status = {
 
-      enable = mkEnableOption (lib.mdDoc "dwm-status user service");
+      enable = mkEnableOption "dwm-status user service";
 
       package = mkPackageOption pkgs "dwm-status" {
         example = "dwm-status.override { enableAlsaUtils = false; }";
@@ -30,7 +30,7 @@ in
 
       order = mkOption {
         type = types.listOf (types.enum [ "audio" "backlight" "battery" "cpu_load" "network" "time" ]);
-        description = lib.mdDoc ''
+        description = ''
           List of enabled features in order.
         '';
       };
@@ -38,7 +38,7 @@ in
       extraConfig = mkOption {
         type = types.lines;
         default = "";
-        description = lib.mdDoc ''
+        description = ''
           Extra config in TOML format.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/dysnomia.nix b/nixpkgs/nixos/modules/services/misc/dysnomia.nix
index 129345e38106..8150b7876221 100644
--- a/nixpkgs/nixos/modules/services/misc/dysnomia.nix
+++ b/nixpkgs/nixos/modules/services/misc/dysnomia.nix
@@ -87,52 +87,52 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to enable Dysnomia";
+        description = "Whether to enable Dysnomia";
       };
 
       enableAuthentication = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to publish privacy-sensitive authentication credentials";
+        description = "Whether to publish privacy-sensitive authentication credentials";
       };
 
       package = mkOption {
         type = types.path;
-        description = lib.mdDoc "The Dysnomia package";
+        description = "The Dysnomia package";
       };
 
       properties = mkOption {
-        description = lib.mdDoc "An attribute set in which each attribute represents a machine property. Optionally, these values can be shell substitutions.";
+        description = "An attribute set in which each attribute represents a machine property. Optionally, these values can be shell substitutions.";
         default = {};
         type = types.attrs;
       };
 
       containers = mkOption {
-        description = lib.mdDoc "An attribute set in which each key represents a container and each value an attribute set providing its configuration properties";
+        description = "An attribute set in which each key represents a container and each value an attribute set providing its configuration properties";
         default = {};
         type = types.attrsOf types.attrs;
       };
 
       components = mkOption {
-        description = lib.mdDoc "An attribute set in which each key represents a container and each value an attribute set in which each key represents a component and each value a derivation constructing its initial state";
+        description = "An attribute set in which each key represents a container and each value an attribute set in which each key represents a component and each value a derivation constructing its initial state";
         default = {};
         type = types.attrsOf types.attrs;
       };
 
       extraContainerProperties = mkOption {
-        description = lib.mdDoc "An attribute set providing additional container settings in addition to the default properties";
+        description = "An attribute set providing additional container settings in addition to the default properties";
         default = {};
         type = types.attrs;
       };
 
       extraContainerPaths = mkOption {
-        description = lib.mdDoc "A list of paths containing additional container configurations that are added to the search folders";
+        description = "A list of paths containing additional container configurations that are added to the search folders";
         default = [];
         type = types.listOf types.path;
       };
 
       extraModulePaths = mkOption {
-        description = lib.mdDoc "A list of paths containing additional modules that are added to the search folders";
+        description = "A list of paths containing additional modules that are added to the search folders";
         default = [];
         type = types.listOf types.path;
       };
@@ -140,7 +140,7 @@ in
       enableLegacyModules = mkOption {
         type = types.bool;
         default = true;
-        description = lib.mdDoc "Whether to enable Dysnomia legacy process and wrapper modules";
+        description = "Whether to enable Dysnomia legacy process and wrapper modules";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/errbot.nix b/nixpkgs/nixos/modules/services/misc/errbot.nix
index a650bc5bbd92..b447ba5d438d 100644
--- a/nixpkgs/nixos/modules/services/misc/errbot.nix
+++ b/nixpkgs/nixos/modules/services/misc/errbot.nix
@@ -27,48 +27,48 @@ in {
   options = {
     services.errbot.instances = mkOption {
       default = {};
-      description = lib.mdDoc "Errbot instance configs";
+      description = "Errbot instance configs";
       type = types.attrsOf (types.submodule {
         options = {
           dataDir = mkOption {
             type = types.nullOr types.path;
             default = null;
-            description = lib.mdDoc "Data directory for errbot instance.";
+            description = "Data directory for errbot instance.";
           };
 
           plugins = mkOption {
             type = types.listOf types.package;
             default = [];
-            description = lib.mdDoc "List of errbot plugin derivations.";
+            description = "List of errbot plugin derivations.";
           };
 
           logLevel = mkOption {
             type = types.str;
             default = "INFO";
-            description = lib.mdDoc "Errbot log level";
+            description = "Errbot log level";
           };
 
           admins = mkOption {
             type = types.listOf types.str;
             default = [];
-            description = lib.mdDoc "List of identifiers of errbot admins.";
+            description = "List of identifiers of errbot admins.";
           };
 
           backend = mkOption {
             type = types.str;
             default = "XMPP";
-            description = lib.mdDoc "Errbot backend name.";
+            description = "Errbot backend name.";
           };
 
           identity = mkOption {
             type = types.attrs;
-            description = lib.mdDoc "Errbot identity configuration";
+            description = "Errbot identity configuration";
           };
 
           extraConfig = mkOption {
             type = types.lines;
             default = "";
-            description = lib.mdDoc "String to be appended to the config verbatim";
+            description = "String to be appended to the config verbatim";
           };
         };
       });
diff --git a/nixpkgs/nixos/modules/services/misc/etebase-server.nix b/nixpkgs/nixos/modules/services/misc/etebase-server.nix
index 6ec3807f0fb2..7b6b5249f230 100644
--- a/nixpkgs/nixos/modules/services/misc/etebase-server.nix
+++ b/nixpkgs/nixos/modules/services/misc/etebase-server.nix
@@ -33,7 +33,7 @@ in
         type = types.bool;
         default = false;
         example = true;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable the Etebase server.
 
           Once enabled you need to create an admin user by invoking the
@@ -47,25 +47,25 @@ in
         type = types.package;
         default = pkgs.python3.pkgs.etebase-server;
         defaultText = literalExpression "pkgs.python3.pkgs.etebase-server";
-        description = lib.mdDoc "etebase-server package to use.";
+        description = "etebase-server package to use.";
       };
 
       dataDir = mkOption {
         type = types.str;
         default = "/var/lib/etebase-server";
-        description = lib.mdDoc "Directory to store the Etebase server data.";
+        description = "Directory to store the Etebase server data.";
       };
 
       port = mkOption {
         type = with types; nullOr port;
         default = 8001;
-        description = lib.mdDoc "Port to listen on.";
+        description = "Port to listen on.";
       };
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to open ports in the firewall for the server.
         '';
       };
@@ -73,7 +73,7 @@ in
       unixSocket = mkOption {
         type = with types; nullOr str;
         default = null;
-        description = lib.mdDoc "The path to the socket to bind to.";
+        description = "The path to the socket to bind to.";
         example = "/run/etebase-server/etebase-server.sock";
       };
 
@@ -86,14 +86,14 @@ in
               debug = mkOption {
                 type = types.bool;
                 default = false;
-                description = lib.mdDoc ''
+                description = ''
                   Whether to set django's DEBUG flag.
                 '';
               };
               secret_file = mkOption {
                 type = with types; nullOr str;
                 default = null;
-                description = lib.mdDoc ''
+                description = ''
                   The path to a file containing the secret
                   used as django's SECRET_KEY.
                 '';
@@ -102,13 +102,13 @@ in
                 type = types.str;
                 default = "${cfg.dataDir}/static";
                 defaultText = literalExpression ''"''${config.services.etebase-server.dataDir}/static"'';
-                description = lib.mdDoc "The directory for static files.";
+                description = "The directory for static files.";
               };
               media_root = mkOption {
                 type = types.str;
                 default = "${cfg.dataDir}/media";
                 defaultText = literalExpression ''"''${config.services.etebase-server.dataDir}/media"'';
-                description = lib.mdDoc "The media directory.";
+                description = "The media directory.";
               };
             };
             allowed_hosts = {
@@ -116,7 +116,7 @@ in
                 type = types.str;
                 default = "0.0.0.0";
                 example = "localhost";
-                description = lib.mdDoc ''
+                description = ''
                   The main host that is allowed access.
                 '';
               };
@@ -125,19 +125,19 @@ in
               engine = mkOption {
                 type = types.enum [ "django.db.backends.sqlite3" "django.db.backends.postgresql" ];
                 default = "django.db.backends.sqlite3";
-                description = lib.mdDoc "The database engine to use.";
+                description = "The database engine to use.";
               };
               name = mkOption {
                 type = types.str;
                 default = "${cfg.dataDir}/db.sqlite3";
                 defaultText = literalExpression ''"''${config.services.etebase-server.dataDir}/db.sqlite3"'';
-                description = lib.mdDoc "The database name.";
+                description = "The database name.";
               };
             };
           };
         };
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           Configuration for `etebase-server`. Refer to
           <https://github.com/etesync/server/blob/master/etebase-server.ini.example>
           and <https://github.com/etesync/server/wiki>
@@ -157,7 +157,7 @@ in
       user = mkOption {
         type = types.str;
         default = defaultUser;
-        description = lib.mdDoc "User under which Etebase server runs.";
+        description = "User under which Etebase server runs.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/etesync-dav.nix b/nixpkgs/nixos/modules/services/misc/etesync-dav.nix
index ae2b5ad04343..ea659c61bd5a 100644
--- a/nixpkgs/nixos/modules/services/misc/etesync-dav.nix
+++ b/nixpkgs/nixos/modules/services/misc/etesync-dav.nix
@@ -7,37 +7,37 @@ let
 in
   {
     options.services.etesync-dav = {
-      enable = mkEnableOption (lib.mdDoc "etesync-dav");
+      enable = mkEnableOption "etesync-dav, end-to-end encrypted sync for contacts, calendars and tasks";
 
       host = mkOption {
         type = types.str;
         default = "localhost";
-        description = lib.mdDoc "The server host address.";
+        description = "The server host address.";
       };
 
       port = mkOption {
         type = types.port;
         default = 37358;
-        description = lib.mdDoc "The server host port.";
+        description = "The server host port.";
       };
 
       apiUrl = mkOption {
         type = types.str;
         default = "https://api.etesync.com/";
-        description = lib.mdDoc "The url to the etesync API.";
+        description = "The url to the etesync API.";
       };
 
       openFirewall = mkOption {
         default = false;
         type = types.bool;
-        description = lib.mdDoc "Whether to open the firewall for the specified port.";
+        description = "Whether to open the firewall for the specified port.";
       };
 
       sslCertificate = mkOption {
         type = types.nullOr types.path;
         default = null;
         example = "/var/etesync.crt";
-        description = lib.mdDoc ''
+        description = ''
           Path to server SSL certificate. It will be copied into
           etesync-dav's data directory.
         '';
@@ -47,7 +47,7 @@ in
         type = types.nullOr types.path;
         default = null;
         example = "/var/etesync.key";
-        description = lib.mdDoc ''
+        description = ''
           Path to server SSL certificate key.  It will be copied into
           etesync-dav's data directory.
         '';
diff --git a/nixpkgs/nixos/modules/services/misc/evdevremapkeys.nix b/nixpkgs/nixos/modules/services/misc/evdevremapkeys.nix
index 11ea6a5f03f2..e559dd89dc9f 100644
--- a/nixpkgs/nixos/modules/services/misc/evdevremapkeys.nix
+++ b/nixpkgs/nixos/modules/services/misc/evdevremapkeys.nix
@@ -8,12 +8,12 @@ let
 in
 {
   options.services.evdevremapkeys = {
-    enable = mkEnableOption (lib.mdDoc ''evdevremapkeys'');
+    enable = mkEnableOption ''evdevremapkeys, a daemon to remap events on linux input devices'';
 
     settings = mkOption {
       type = format.type;
       default = { };
-      description = lib.mdDoc ''
+      description = ''
         config.yaml for evdevremapkeys
       '';
     };
diff --git a/nixpkgs/nixos/modules/services/misc/felix.nix b/nixpkgs/nixos/modules/services/misc/felix.nix
index 306d4cf0d7cf..0283de128afe 100644
--- a/nixpkgs/nixos/modules/services/misc/felix.nix
+++ b/nixpkgs/nixos/modules/services/misc/felix.nix
@@ -17,25 +17,25 @@ in
 
     services.felix = {
 
-      enable = mkEnableOption (lib.mdDoc "the Apache Felix OSGi service");
+      enable = mkEnableOption "the Apache Felix OSGi service";
 
       bundles = mkOption {
         type = types.listOf types.package;
         default = [ pkgs.felix_remoteshell ];
         defaultText = literalExpression "[ pkgs.felix_remoteshell ]";
-        description = lib.mdDoc "List of bundles that should be activated on startup";
+        description = "List of bundles that should be activated on startup";
       };
 
       user = mkOption {
         type = types.str;
         default = "osgi";
-        description = lib.mdDoc "User account under which Apache Felix runs.";
+        description = "User account under which Apache Felix runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "osgi";
-        description = lib.mdDoc "Group account under which Apache Felix runs.";
+        description = "Group account under which Apache Felix runs.";
       };
 
     };
diff --git a/nixpkgs/nixos/modules/services/misc/forgejo.nix b/nixpkgs/nixos/modules/services/misc/forgejo.nix
index 08cddc3a0710..babed2d5acd4 100644
--- a/nixpkgs/nixos/modules/services/misc/forgejo.nix
+++ b/nixpkgs/nixos/modules/services/misc/forgejo.nix
@@ -14,7 +14,6 @@ let
 
   inherit (lib)
     literalExpression
-    mdDoc
     mkChangedOptionModule
     mkDefault
     mkEnableOption
@@ -55,14 +54,14 @@ in
 
   options = {
     services.forgejo = {
-      enable = mkEnableOption (mdDoc "Forgejo");
+      enable = mkEnableOption "Forgejo, a software forge";
 
       package = mkPackageOption pkgs "forgejo" { };
 
       useWizard = mkOption {
         default = false;
         type = types.bool;
-        description = mdDoc ''
+        description = ''
           Whether to use the built-in installation wizard instead of
           declaratively managing the {file}`app.ini` config file in nix.
         '';
@@ -71,14 +70,14 @@ in
       stateDir = mkOption {
         default = "/var/lib/forgejo";
         type = types.str;
-        description = mdDoc "Forgejo data directory.";
+        description = "Forgejo data directory.";
       };
 
       customDir = mkOption {
         default = "${cfg.stateDir}/custom";
         defaultText = literalExpression ''"''${config.${opt.stateDir}}/custom"'';
         type = types.str;
-        description = mdDoc ''
+        description = ''
           Base directory for custom templates and other options.
 
           If {option}`${opt.useWizard}` is disabled (default), this directory will also
@@ -89,13 +88,13 @@ in
       user = mkOption {
         type = types.str;
         default = "forgejo";
-        description = mdDoc "User account under which Forgejo runs.";
+        description = "User account under which Forgejo runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "forgejo";
-        description = mdDoc "Group under which Forgejo runs.";
+        description = "Group under which Forgejo runs.";
       };
 
       database = {
@@ -103,43 +102,43 @@ in
           type = types.enum [ "sqlite3" "mysql" "postgres" ];
           example = "mysql";
           default = "sqlite3";
-          description = mdDoc "Database engine to use.";
+          description = "Database engine to use.";
         };
 
         host = mkOption {
           type = types.str;
           default = "127.0.0.1";
-          description = mdDoc "Database host address.";
+          description = "Database host address.";
         };
 
         port = mkOption {
           type = types.port;
-          default = if !usePostgresql then 3306 else pg.port;
+          default = if usePostgresql then pg.settings.port else 3306;
           defaultText = literalExpression ''
             if config.${opt.database.type} != "postgresql"
             then 3306
-            else config.${options.services.postgresql.port}
+            else 5432
           '';
-          description = mdDoc "Database host port.";
+          description = "Database host port.";
         };
 
         name = mkOption {
           type = types.str;
           default = "forgejo";
-          description = mdDoc "Database name.";
+          description = "Database name.";
         };
 
         user = mkOption {
           type = types.str;
           default = "forgejo";
-          description = mdDoc "Database user.";
+          description = "Database user.";
         };
 
         passwordFile = mkOption {
           type = types.nullOr types.path;
           default = null;
           example = "/run/keys/forgejo-dbpassword";
-          description = mdDoc ''
+          description = ''
             A file containing the password corresponding to
             {option}`${opt.database.user}`.
           '';
@@ -150,31 +149,31 @@ in
           default = if (cfg.database.createDatabase && usePostgresql) then "/run/postgresql" else if (cfg.database.createDatabase && useMysql) then "/run/mysqld/mysqld.sock" else null;
           defaultText = literalExpression "null";
           example = "/run/mysqld/mysqld.sock";
-          description = mdDoc "Path to the unix socket file to use for authentication.";
+          description = "Path to the unix socket file to use for authentication.";
         };
 
         path = mkOption {
           type = types.str;
           default = "${cfg.stateDir}/data/forgejo.db";
           defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/forgejo.db"'';
-          description = mdDoc "Path to the sqlite3 database file.";
+          description = "Path to the sqlite3 database file.";
         };
 
         createDatabase = mkOption {
           type = types.bool;
           default = true;
-          description = mdDoc "Whether to create a local database automatically.";
+          description = "Whether to create a local database automatically.";
         };
       };
 
       dump = {
-        enable = mkEnableOption (mdDoc "periodic dumps via the [built-in {command}`dump` command](https://forgejo.org/docs/latest/admin/command-line/#dump)");
+        enable = mkEnableOption "periodic dumps via the [built-in {command}`dump` command](https://forgejo.org/docs/latest/admin/command-line/#dump)";
 
         interval = mkOption {
           type = types.str;
           default = "04:31";
           example = "hourly";
-          description = mdDoc ''
+          description = ''
             Run a Forgejo dump at this interval. Runs by default at 04:31 every day.
 
             The format is described in
@@ -186,19 +185,19 @@ in
           type = types.str;
           default = "${cfg.stateDir}/dump";
           defaultText = literalExpression ''"''${config.${opt.stateDir}}/dump"'';
-          description = mdDoc "Path to the directory where the dump archives will be stored.";
+          description = "Path to the directory where the dump archives will be stored.";
         };
 
         type = mkOption {
           type = types.enum [ "zip" "tar" "tar.sz" "tar.gz" "tar.xz" "tar.bz2" "tar.br" "tar.lz4" "tar.zst" ];
           default = "zip";
-          description = mdDoc "Archive format used to store the dump file.";
+          description = "Archive format used to store the dump file.";
         };
 
         file = mkOption {
           type = types.nullOr types.str;
           default = null;
-          description = mdDoc "Filename to be used for the dump. If `null` a default name is chosen by forgejo.";
+          description = "Filename to be used for the dump. If `null` a default name is chosen by forgejo.";
           example = "forgejo-dump";
         };
       };
@@ -207,14 +206,14 @@ in
         enable = mkOption {
           type = types.bool;
           default = false;
-          description = mdDoc "Enables git-lfs support.";
+          description = "Enables git-lfs support.";
         };
 
         contentDir = mkOption {
           type = types.str;
           default = "${cfg.stateDir}/data/lfs";
           defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/lfs"'';
-          description = mdDoc "Where to store LFS files.";
+          description = "Where to store LFS files.";
         };
       };
 
@@ -222,19 +221,19 @@ in
         type = types.str;
         default = "${cfg.stateDir}/repositories";
         defaultText = literalExpression ''"''${config.${opt.stateDir}}/repositories"'';
-        description = mdDoc "Path to the git repositories.";
+        description = "Path to the git repositories.";
       };
 
       mailerPasswordFile = mkOption {
         type = types.nullOr types.str;
         default = null;
         example = "/run/keys/forgejo-mailpw";
-        description = mdDoc "Path to a file containing the SMTP password.";
+        description = "Path to a file containing the SMTP password.";
       };
 
       settings = mkOption {
         default = { };
-        description = mdDoc ''
+        description = ''
           Free-form settings written directly to the `app.ini` configfile file.
           Refer to <https://forgejo.org/docs/latest/admin/config-cheat-sheet/> for supported values.
         '';
@@ -267,12 +266,12 @@ in
                 default = "${cfg.stateDir}/log";
                 defaultText = literalExpression ''"''${config.${opt.stateDir}}/log"'';
                 type = types.str;
-                description = mdDoc "Root path for log files.";
+                description = "Root path for log files.";
               };
               LEVEL = mkOption {
                 default = "Info";
                 type = types.enum [ "Trace" "Debug" "Info" "Warn" "Error" "Critical" ];
-                description = mdDoc "General log level.";
+                description = "General log level.";
               };
             };
 
@@ -280,33 +279,33 @@ in
               PROTOCOL = mkOption {
                 type = types.enum [ "http" "https" "fcgi" "http+unix" "fcgi+unix" ];
                 default = "http";
-                description = mdDoc ''Listen protocol. `+unix` means "over unix", not "in addition to."'';
+                description = ''Listen protocol. `+unix` means "over unix", not "in addition to."'';
               };
 
               HTTP_ADDR = mkOption {
                 type = types.either types.str types.path;
                 default = if lib.hasSuffix "+unix" cfg.settings.server.PROTOCOL then "/run/forgejo/forgejo.sock" else "0.0.0.0";
                 defaultText = literalExpression ''if lib.hasSuffix "+unix" cfg.settings.server.PROTOCOL then "/run/forgejo/forgejo.sock" else "0.0.0.0"'';
-                description = mdDoc "Listen address. Must be a path when using a unix socket.";
+                description = "Listen address. Must be a path when using a unix socket.";
               };
 
               HTTP_PORT = mkOption {
                 type = types.port;
                 default = 3000;
-                description = mdDoc "Listen port. Ignored when using a unix socket.";
+                description = "Listen port. Ignored when using a unix socket.";
               };
 
               DOMAIN = mkOption {
                 type = types.str;
                 default = "localhost";
-                description = mdDoc "Domain name of your server.";
+                description = "Domain name of your server.";
               };
 
               ROOT_URL = mkOption {
                 type = types.str;
                 default = "http://${cfg.settings.server.DOMAIN}:${toString cfg.settings.server.HTTP_PORT}/";
                 defaultText = literalExpression ''"http://''${config.services.forgejo.settings.server.DOMAIN}:''${toString config.services.forgejo.settings.server.HTTP_PORT}/"'';
-                description = mdDoc "Full public URL of Forgejo server.";
+                description = "Full public URL of Forgejo server.";
               };
 
               STATIC_ROOT_PATH = mkOption {
@@ -314,20 +313,20 @@ in
                 default = cfg.package.data;
                 defaultText = literalExpression "config.${opt.package}.data";
                 example = "/var/lib/forgejo/data";
-                description = mdDoc "Upper level of template and static files path.";
+                description = "Upper level of template and static files path.";
               };
 
               DISABLE_SSH = mkOption {
                 type = types.bool;
                 default = false;
-                description = mdDoc "Disable external SSH feature.";
+                description = "Disable external SSH feature.";
               };
 
               SSH_PORT = mkOption {
                 type = types.port;
                 default = 22;
                 example = 2222;
-                description = mdDoc ''
+                description = ''
                   SSH port displayed in clone URL.
                   The option is required to configure a service when the external visible port
                   differs from the local listening port i.e. if port forwarding is used.
@@ -339,7 +338,7 @@ in
               COOKIE_SECURE = mkOption {
                 type = types.bool;
                 default = false;
-                description = mdDoc ''
+                description = ''
                   Marks session cookies as "secure" as a hint for browsers to only send
                   them via HTTPS. This option is recommend, if Forgejo is being served over HTTPS.
                 '';
diff --git a/nixpkgs/nixos/modules/services/misc/freeswitch.nix b/nixpkgs/nixos/modules/services/misc/freeswitch.nix
index a8f7b3d0c3ae..e90d9838fcb7 100644
--- a/nixpkgs/nixos/modules/services/misc/freeswitch.nix
+++ b/nixpkgs/nixos/modules/services/misc/freeswitch.nix
@@ -18,11 +18,11 @@ let
 in {
   options = {
     services.freeswitch = {
-      enable = mkEnableOption (lib.mdDoc "FreeSWITCH");
+      enable = mkEnableOption "FreeSWITCH";
       enableReload = mkOption {
         default = false;
         type = types.bool;
-        description = lib.mdDoc ''
+        description = ''
           Issue the `reloadxml` command to FreeSWITCH when configuration directory changes (instead of restart).
           See [FreeSWITCH documentation](https://freeswitch.org/confluence/display/FREESWITCH/Reloading) for more info.
           The configuration directory is exposed at {file}`/etc/freeswitch`.
@@ -34,7 +34,7 @@ in {
         default = "${config.services.freeswitch.package}/share/freeswitch/conf/vanilla";
         defaultText = literalExpression ''"''${config.services.freeswitch.package}/share/freeswitch/conf/vanilla"'';
         example = literalExpression ''"''${config.services.freeswitch.package}/share/freeswitch/conf/minimal"'';
-        description = lib.mdDoc ''
+        description = ''
           Configuration template to use.
           See available templates in [FreeSWITCH repository](https://github.com/signalwire/freeswitch/tree/master/conf).
           You can also set your own configuration directory.
@@ -51,7 +51,7 @@ in {
             ''';
           }
         '';
-        description = lib.mdDoc ''
+        description = ''
           Override file in FreeSWITCH config template directory.
           Each top-level attribute denotes a file path in the configuration directory, its value is the file path.
           See [FreeSWITCH documentation](https://freeswitch.org/confluence/display/FREESWITCH/Default+Configuration) for more info.
diff --git a/nixpkgs/nixos/modules/services/misc/fstrim.nix b/nixpkgs/nixos/modules/services/misc/fstrim.nix
index 55fb24e29272..d2dda2636ef1 100644
--- a/nixpkgs/nixos/modules/services/misc/fstrim.nix
+++ b/nixpkgs/nixos/modules/services/misc/fstrim.nix
@@ -11,12 +11,12 @@ in {
   options = {
 
     services.fstrim = {
-      enable = mkEnableOption (lib.mdDoc "periodic SSD TRIM of mounted partitions in background");
+      enable = mkEnableOption "periodic SSD TRIM of mounted partitions in background";
 
       interval = mkOption {
         type = types.str;
         default = "weekly";
-        description = lib.mdDoc ''
+        description = ''
           How often we run fstrim. For most desktop and server systems
           a sufficient trimming frequency is once a week.
 
diff --git a/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix b/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix
index eff725f5a868..b30258333af2 100644
--- a/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix
+++ b/nixpkgs/nixos/modules/services/misc/gammu-smsd.nix
@@ -53,44 +53,44 @@ in {
   options = {
     services.gammu-smsd = {
 
-      enable = mkEnableOption (lib.mdDoc "gammu-smsd daemon");
+      enable = mkEnableOption "gammu-smsd daemon";
 
       user = mkOption {
         type = types.str;
         default = "smsd";
-        description = lib.mdDoc "User that has access to the device";
+        description = "User that has access to the device";
       };
 
       device = {
         path = mkOption {
           type = types.path;
-          description = lib.mdDoc "Device node or address of the phone";
+          description = "Device node or address of the phone";
           example = "/dev/ttyUSB2";
         };
 
         group = mkOption {
           type = types.str;
           default = "root";
-          description = lib.mdDoc "Owner group of the device";
+          description = "Owner group of the device";
           example = "dialout";
         };
 
         connection = mkOption {
           type = types.str;
           default = "at";
-          description = lib.mdDoc "Protocol which will be used to talk to the phone";
+          description = "Protocol which will be used to talk to the phone";
         };
 
         synchronizeTime = mkOption {
           type = types.bool;
           default = true;
-          description = lib.mdDoc "Whether to set time from computer to the phone during starting connection";
+          description = "Whether to set time from computer to the phone during starting connection";
         };
 
         pin = mkOption {
           type = types.nullOr types.str;
           default = null;
-          description = lib.mdDoc "PIN code for the simcard";
+          description = "PIN code for the simcard";
         };
       };
 
@@ -99,13 +99,13 @@ in {
         file = mkOption {
           type = types.str;
           default = "syslog";
-          description = lib.mdDoc "Path to file where information about communication will be stored";
+          description = "Path to file where information about communication will be stored";
         };
 
         format = mkOption {
           type = types.enum [ "nothing" "text" "textall" "textalldate" "errors" "errorsdate" "binary" ];
           default = "errors";
-          description = lib.mdDoc "Determines what will be logged to the LogFile";
+          description = "Determines what will be logged to the LogFile";
         };
       };
 
@@ -114,14 +114,14 @@ in {
         gammu = mkOption {
           type = types.lines;
           default = "";
-          description = lib.mdDoc "Extra config lines to be added into [gammu] section";
+          description = "Extra config lines to be added into [gammu] section";
         };
 
 
         smsd = mkOption {
           type = types.lines;
           default = "";
-          description = lib.mdDoc "Extra config lines to be added into [smsd] section";
+          description = "Extra config lines to be added into [smsd] section";
         };
       };
 
@@ -130,69 +130,69 @@ in {
         service = mkOption {
           type = types.enum [ "null" "files" "sql" ];
           default = "null";
-          description = lib.mdDoc "Service to use to store sms data.";
+          description = "Service to use to store sms data.";
         };
 
         files = {
           inboxPath = mkOption {
             type = types.path;
             default = "/var/spool/sms/inbox/";
-            description = lib.mdDoc "Where the received SMSes are stored";
+            description = "Where the received SMSes are stored";
           };
 
           outboxPath = mkOption {
             type = types.path;
             default = "/var/spool/sms/outbox/";
-            description = lib.mdDoc "Where SMSes to be sent should be placed";
+            description = "Where SMSes to be sent should be placed";
           };
 
           sentSMSPath = mkOption {
             type = types.path;
             default = "/var/spool/sms/sent/";
-            description = lib.mdDoc "Where the transmitted SMSes are placed";
+            description = "Where the transmitted SMSes are placed";
           };
 
           errorSMSPath = mkOption {
             type = types.path;
             default = "/var/spool/sms/error/";
-            description = lib.mdDoc "Where SMSes with error in transmission is placed";
+            description = "Where SMSes with error in transmission is placed";
           };
         };
 
         sql = {
           driver = mkOption {
             type = types.enum [ "native_mysql" "native_pgsql" "odbc" "dbi" ];
-            description = lib.mdDoc "DB driver to use";
+            description = "DB driver to use";
           };
 
           sqlDialect = mkOption {
             type = types.nullOr types.str;
             default = null;
-            description = lib.mdDoc "SQL dialect to use (odbc driver only)";
+            description = "SQL dialect to use (odbc driver only)";
           };
 
           database = mkOption {
             type = types.nullOr types.str;
             default = null;
-            description = lib.mdDoc "Database name to store sms data";
+            description = "Database name to store sms data";
           };
 
           host = mkOption {
             type = types.str;
             default = "localhost";
-            description = lib.mdDoc "Database server address";
+            description = "Database server address";
           };
 
           user = mkOption {
             type = types.nullOr types.str;
             default = null;
-            description = lib.mdDoc "User name used for connection to the database";
+            description = "User name used for connection to the database";
           };
 
           password = mkOption {
             type = types.nullOr types.str;
             default = null;
-            description = lib.mdDoc "User password used for connection to the database";
+            description = "User password used for connection to the database";
           };
         };
       };
diff --git a/nixpkgs/nixos/modules/services/misc/geoipupdate.nix b/nixpkgs/nixos/modules/services/misc/geoipupdate.nix
index 27c1157e9a8c..f46bf7b394fe 100644
--- a/nixpkgs/nixos/modules/services/misc/geoipupdate.nix
+++ b/nixpkgs/nixos/modules/services/misc/geoipupdate.nix
@@ -11,14 +11,14 @@ in
 
   options = {
     services.geoipupdate = {
-      enable = lib.mkEnableOption (lib.mdDoc ''
-        periodic downloading of GeoIP databases using geoipupdate.
-      '');
+      enable = lib.mkEnableOption ''
+        periodic downloading of GeoIP databases using geoipupdate
+      '';
 
       interval = lib.mkOption {
         type = lib.types.str;
         default = "weekly";
-        description = lib.mdDoc ''
+        description = ''
           Update the GeoIP databases at this time / interval.
           The format is described in
           {manpage}`systemd.time(7)`.
@@ -35,7 +35,7 @@ in
             ProxyUserPassword = { _secret = "/run/keys/proxy_pass"; };
           }
         '';
-        description = lib.mdDoc ''
+        description = ''
           geoipupdate configuration options. See
           <https://github.com/maxmind/geoipupdate/blob/main/doc/GeoIP.conf.md>
           for a full list of available options.
@@ -62,7 +62,7 @@ in
 
             AccountID = lib.mkOption {
               type = lib.types.int;
-              description = lib.mdDoc ''
+              description = ''
                 Your MaxMind account ID.
               '';
             };
@@ -74,7 +74,7 @@ in
                 "GeoLite2-City"
                 "GeoLite2-Country"
               ];
-              description = lib.mdDoc ''
+              description = ''
                 List of database edition IDs. This includes new string
                 IDs like `GeoIP2-City` and old
                 numeric IDs like `106`.
@@ -83,7 +83,7 @@ in
 
             LicenseKey = lib.mkOption {
               type = with lib.types; either path (attrsOf path);
-              description = lib.mdDoc ''
+              description = ''
                 A file containing the MaxMind license key.
 
                 Always handled as a secret whether the value is
@@ -98,7 +98,7 @@ in
               type = lib.types.path;
               default = "/var/lib/GeoIP";
               example = "/run/GeoIP";
-              description = lib.mdDoc ''
+              description = ''
                 The directory to store the database files in. The
                 directory will be automatically created, the owner
                 changed to `geoip` and permissions
diff --git a/nixpkgs/nixos/modules/services/misc/gitea.nix b/nixpkgs/nixos/modules/services/misc/gitea.nix
index 08feea853e47..a8526688b074 100644
--- a/nixpkgs/nixos/modules/services/misc/gitea.nix
+++ b/nixpkgs/nixos/modules/services/misc/gitea.nix
@@ -48,7 +48,7 @@ in
       enable = mkOption {
         default = false;
         type = types.bool;
-        description = lib.mdDoc "Enable Gitea Service.";
+        description = "Enable Gitea Service.";
       };
 
       package = mkPackageOption pkgs "gitea" { };
@@ -56,32 +56,32 @@ in
       useWizard = mkOption {
         default = false;
         type = types.bool;
-        description = lib.mdDoc "Do not generate a configuration and use gitea' installation wizard instead. The first registered user will be administrator.";
+        description = "Do not generate a configuration and use gitea' installation wizard instead. The first registered user will be administrator.";
       };
 
       stateDir = mkOption {
         default = "/var/lib/gitea";
         type = types.str;
-        description = lib.mdDoc "Gitea data directory.";
+        description = "Gitea data directory.";
       };
 
       customDir = mkOption {
         default = "${cfg.stateDir}/custom";
         defaultText = literalExpression ''"''${config.${opt.stateDir}}/custom"'';
         type = types.str;
-        description = lib.mdDoc "Gitea custom directory. Used for config, custom templates and other options.";
+        description = "Gitea custom directory. Used for config, custom templates and other options.";
       };
 
       user = mkOption {
         type = types.str;
         default = "gitea";
-        description = lib.mdDoc "User account under which gitea runs.";
+        description = "User account under which gitea runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "gitea";
-        description = lib.mdDoc "Group under which gitea runs.";
+        description = "Group under which gitea runs.";
       };
 
       database = {
@@ -89,42 +89,42 @@ in
           type = types.enum [ "sqlite3" "mysql" "postgres" ];
           example = "mysql";
           default = "sqlite3";
-          description = lib.mdDoc "Database engine to use.";
+          description = "Database engine to use.";
         };
 
         host = mkOption {
           type = types.str;
           default = "127.0.0.1";
-          description = lib.mdDoc "Database host address.";
+          description = "Database host address.";
         };
 
         port = mkOption {
           type = types.port;
-          default = if !usePostgresql then 3306 else pg.port;
+          default = if usePostgresql then pg.settings.port else 3306;
           defaultText = literalExpression ''
             if config.${opt.database.type} != "postgresql"
             then 3306
-            else config.${options.services.postgresql.port}
+            else 5432
           '';
-          description = lib.mdDoc "Database host port.";
+          description = "Database host port.";
         };
 
         name = mkOption {
           type = types.str;
           default = "gitea";
-          description = lib.mdDoc "Database name.";
+          description = "Database name.";
         };
 
         user = mkOption {
           type = types.str;
           default = "gitea";
-          description = lib.mdDoc "Database user.";
+          description = "Database user.";
         };
 
         password = mkOption {
           type = types.str;
           default = "";
-          description = lib.mdDoc ''
+          description = ''
             The password corresponding to {option}`database.user`.
             Warning: this is stored in cleartext in the Nix store!
             Use {option}`database.passwordFile` instead.
@@ -135,7 +135,7 @@ in
           type = types.nullOr types.path;
           default = null;
           example = "/run/keys/gitea-dbpassword";
-          description = lib.mdDoc ''
+          description = ''
             A file containing the password corresponding to
             {option}`database.user`.
           '';
@@ -146,20 +146,20 @@ in
           default = if (cfg.database.createDatabase && usePostgresql) then "/run/postgresql" else if (cfg.database.createDatabase && useMysql) then "/run/mysqld/mysqld.sock" else null;
           defaultText = literalExpression "null";
           example = "/run/mysqld/mysqld.sock";
-          description = lib.mdDoc "Path to the unix socket file to use for authentication.";
+          description = "Path to the unix socket file to use for authentication.";
         };
 
         path = mkOption {
           type = types.str;
           default = "${cfg.stateDir}/data/gitea.db";
           defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/gitea.db"'';
-          description = lib.mdDoc "Path to the sqlite3 database file.";
+          description = "Path to the sqlite3 database file.";
         };
 
         createDatabase = mkOption {
           type = types.bool;
           default = true;
-          description = lib.mdDoc "Whether to create a local database automatically.";
+          description = "Whether to create a local database automatically.";
         };
       };
 
@@ -167,7 +167,7 @@ in
         enable = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc ''
+          description = ''
             Enable a timer that runs gitea dump to generate backup-files of the
             current gitea database and repositories.
           '';
@@ -177,7 +177,7 @@ in
           type = types.str;
           default = "04:31";
           example = "hourly";
-          description = lib.mdDoc ''
+          description = ''
             Run a gitea dump at this interval. Runs by default at 04:31 every day.
 
             The format is described in
@@ -189,19 +189,19 @@ in
           type = types.str;
           default = "${cfg.stateDir}/dump";
           defaultText = literalExpression ''"''${config.${opt.stateDir}}/dump"'';
-          description = lib.mdDoc "Path to the dump files.";
+          description = "Path to the dump files.";
         };
 
         type = mkOption {
           type = types.enum [ "zip" "rar" "tar" "sz" "tar.gz" "tar.xz" "tar.bz2" "tar.br" "tar.lz4" "tar.zst" ];
           default = "zip";
-          description = lib.mdDoc "Archive format used to store the dump file.";
+          description = "Archive format used to store the dump file.";
         };
 
         file = mkOption {
           type = types.nullOr types.str;
           default = null;
-          description = lib.mdDoc "Filename to be used for the dump. If `null` a default name is chosen by gitea.";
+          description = "Filename to be used for the dump. If `null` a default name is chosen by gitea.";
           example = "gitea-dump";
         };
       };
@@ -210,54 +210,54 @@ in
         enable = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Enables git-lfs support.";
+          description = "Enables git-lfs support.";
         };
 
         contentDir = mkOption {
           type = types.str;
           default = "${cfg.stateDir}/data/lfs";
           defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/lfs"'';
-          description = lib.mdDoc "Where to store LFS files.";
+          description = "Where to store LFS files.";
         };
       };
 
       appName = mkOption {
         type = types.str;
         default = "gitea: Gitea Service";
-        description = lib.mdDoc "Application name.";
+        description = "Application name.";
       };
 
       repositoryRoot = mkOption {
         type = types.str;
         default = "${cfg.stateDir}/repositories";
         defaultText = literalExpression ''"''${config.${opt.stateDir}}/repositories"'';
-        description = lib.mdDoc "Path to the git repositories.";
+        description = "Path to the git repositories.";
       };
 
       camoHmacKeyFile = mkOption {
         type = types.nullOr types.str;
         default = null;
         example = "/var/lib/secrets/gitea/camoHmacKey";
-        description = lib.mdDoc "Path to a file containing the camo HMAC key.";
+        description = "Path to a file containing the camo HMAC key.";
       };
 
       mailerPasswordFile = mkOption {
         type = types.nullOr types.str;
         default = null;
         example = "/var/lib/secrets/gitea/mailpw";
-        description = lib.mdDoc "Path to a file containing the SMTP password.";
+        description = "Path to a file containing the SMTP password.";
       };
 
       metricsTokenFile = mkOption {
         type = types.nullOr types.str;
         default = null;
         example = "/var/lib/secrets/gitea/metrics_token";
-        description = lib.mdDoc "Path to a file containing the metrics authentication token.";
+        description = "Path to a file containing the metrics authentication token.";
       };
 
       settings = mkOption {
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           Gitea configuration. Refer to <https://docs.gitea.io/en-us/config-cheat-sheet/>
           for details on supported values.
         '';
@@ -287,12 +287,12 @@ in
                 default = "${cfg.stateDir}/log";
                 defaultText = literalExpression ''"''${config.${opt.stateDir}}/log"'';
                 type = types.str;
-                description = lib.mdDoc "Root path for log files.";
+                description = "Root path for log files.";
               };
               LEVEL = mkOption {
                 default = "Info";
                 type = types.enum [ "Trace" "Debug" "Info" "Warn" "Error" "Critical" ];
-                description = lib.mdDoc "General log level.";
+                description = "General log level.";
               };
             };
 
@@ -300,33 +300,33 @@ in
               PROTOCOL = mkOption {
                 type = types.enum [ "http" "https" "fcgi" "http+unix" "fcgi+unix" ];
                 default = "http";
-                description = lib.mdDoc ''Listen protocol. `+unix` means "over unix", not "in addition to."'';
+                description = ''Listen protocol. `+unix` means "over unix", not "in addition to."'';
               };
 
               HTTP_ADDR = mkOption {
                 type = types.either types.str types.path;
                 default = if lib.hasSuffix "+unix" cfg.settings.server.PROTOCOL then "/run/gitea/gitea.sock" else "0.0.0.0";
                 defaultText = literalExpression ''if lib.hasSuffix "+unix" cfg.settings.server.PROTOCOL then "/run/gitea/gitea.sock" else "0.0.0.0"'';
-                description = lib.mdDoc "Listen address. Must be a path when using a unix socket.";
+                description = "Listen address. Must be a path when using a unix socket.";
               };
 
               HTTP_PORT = mkOption {
                 type = types.port;
                 default = 3000;
-                description = lib.mdDoc "Listen port. Ignored when using a unix socket.";
+                description = "Listen port. Ignored when using a unix socket.";
               };
 
               DOMAIN = mkOption {
                 type = types.str;
                 default = "localhost";
-                description = lib.mdDoc "Domain name of your server.";
+                description = "Domain name of your server.";
               };
 
               ROOT_URL = mkOption {
                 type = types.str;
                 default = "http://${cfg.settings.server.DOMAIN}:${toString cfg.settings.server.HTTP_PORT}/";
                 defaultText = literalExpression ''"http://''${config.services.gitea.settings.server.DOMAIN}:''${toString config.services.gitea.settings.server.HTTP_PORT}/"'';
-                description = lib.mdDoc "Full public URL of gitea server.";
+                description = "Full public URL of gitea server.";
               };
 
               STATIC_ROOT_PATH = mkOption {
@@ -334,20 +334,20 @@ in
                 default = cfg.package.data;
                 defaultText = literalExpression "config.${opt.package}.data";
                 example = "/var/lib/gitea/data";
-                description = lib.mdDoc "Upper level of template and static files path.";
+                description = "Upper level of template and static files path.";
               };
 
               DISABLE_SSH = mkOption {
                 type = types.bool;
                 default = false;
-                description = lib.mdDoc "Disable external SSH feature.";
+                description = "Disable external SSH feature.";
               };
 
               SSH_PORT = mkOption {
                 type = types.port;
                 default = 22;
                 example = 2222;
-                description = lib.mdDoc ''
+                description = ''
                   SSH port displayed in clone URL.
                   The option is required to configure a service when the external visible port
                   differs from the local listening port i.e. if port forwarding is used.
@@ -356,8 +356,8 @@ in
             };
 
             service = {
-              DISABLE_REGISTRATION = mkEnableOption (lib.mdDoc "the registration lock") // {
-                description = lib.mdDoc ''
+              DISABLE_REGISTRATION = mkEnableOption "the registration lock" // {
+                description = ''
                   By default any user can create an account on this `gitea` instance.
                   This can be disabled by using this option.
 
@@ -373,7 +373,7 @@ in
               COOKIE_SECURE = mkOption {
                 type = types.bool;
                 default = false;
-                description = lib.mdDoc ''
+                description = ''
                   Marks session cookies as "secure" as a hint for browsers to only send
                   them via HTTPS. This option is recommend, if gitea is being served over HTTPS.
                 '';
@@ -386,7 +386,7 @@ in
       extraConfig = mkOption {
         type = with types; nullOr str;
         default = null;
-        description = lib.mdDoc "Configuration lines appended to the generated gitea configuration file.";
+        description = "Configuration lines appended to the generated gitea configuration file.";
       };
     };
   };
@@ -722,5 +722,5 @@ in
       timerConfig.OnCalendar = cfg.dump.interval;
     };
   };
-  meta.maintainers = with lib.maintainers; [ srhb ma27 thehedgeh0g ];
+  meta.maintainers = with lib.maintainers; [ srhb ma27 pyrox0 ];
 }
diff --git a/nixpkgs/nixos/modules/services/misc/gitlab.nix b/nixpkgs/nixos/modules/services/misc/gitlab.nix
index e95ab0a112bc..7b96a182f0d9 100644
--- a/nixpkgs/nixos/modules/services/misc/gitlab.nix
+++ b/nixpkgs/nixos/modules/services/misc/gitlab.nix
@@ -18,6 +18,8 @@ let
   gitalySocket = "${cfg.statePath}/tmp/sockets/gitaly.socket";
   pathUrlQuote = url: replaceStrings ["/"] ["%2F"] url;
 
+  gitlabVersionAtLeast = version: lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) version;
+
   databaseConfig = let
     val = {
       adapter = "postgresql";
@@ -27,10 +29,16 @@ let
       encoding = "utf8";
       pool = cfg.databasePool;
     } // cfg.extraDatabaseConfig;
-  in if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then {
-    production.main = val;
-  } else {
-    production = val;
+  in {
+    production = (
+      if (gitlabVersionAtLeast "15.0")
+      then { main = val; }
+      else val
+    ) // lib.optionalAttrs (gitlabVersionAtLeast "15.9") {
+      ci = val // {
+        database_tasks = false;
+      };
+    };
   };
 
   # We only want to create a database if we're actually going to connect to it.
@@ -253,7 +261,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Enable the gitlab service.
         '';
       };
@@ -273,7 +281,7 @@ in {
       statePath = mkOption {
         type = types.str;
         default = "/var/gitlab/state";
-        description = lib.mdDoc ''
+        description = ''
           GitLab state directory. Configuration, repositories and
           logs, among other things, are stored here.
 
@@ -287,7 +295,7 @@ in {
       extraEnv = mkOption {
         type = types.attrsOf types.str;
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           Additional environment variables for the GitLab environment.
         '';
       };
@@ -296,7 +304,7 @@ in {
         type = with types; either str (listOf str);
         default = [];
         example = "03:00";
-        description = lib.mdDoc ''
+        description = ''
           The time(s) to run automatic backup of GitLab
           state. Specified in systemd's time format; see
           {manpage}`systemd.time(7)`.
@@ -307,7 +315,7 @@ in {
         type = types.str;
         default = cfg.statePath + "/backup";
         defaultText = literalExpression ''config.${opt.statePath} + "/backup"'';
-        description = lib.mdDoc "GitLab path for backups.";
+        description = "GitLab path for backups.";
       };
 
       backup.keepTime = mkOption {
@@ -315,7 +323,7 @@ in {
         default = 0;
         example = 48;
         apply = x: x * 60 * 60;
-        description = lib.mdDoc ''
+        description = ''
           How long to keep the backups around, in
           hours. `0` means “keep forever”.
         '';
@@ -339,7 +347,7 @@ in {
         default = [];
         example = [ "artifacts" "lfs" ];
         apply = x: if isString x then x else concatStringsSep "," x;
-        description = lib.mdDoc ''
+        description = ''
           Directories to exclude from the backup. The example excludes
           CI artifacts and LFS objects from the backups. The
           `tar` option skips the creation of a tar
@@ -378,7 +386,7 @@ in {
             storage_class = "STANDARD";
           };
         '';
-        description = lib.mdDoc ''
+        description = ''
           GitLab automatic upload specification. Tells GitLab to
           upload the backup to a remote location when done.
 
@@ -391,7 +399,7 @@ in {
       databaseHost = mkOption {
         type = types.str;
         default = "";
-        description = lib.mdDoc ''
+        description = ''
           GitLab database hostname. An empty string means
           “use local unix socket connection”.
         '';
@@ -400,7 +408,7 @@ in {
       databasePasswordFile = mkOption {
         type = with types; nullOr path;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           File containing the GitLab database user password.
 
           This should be a string, not a nix path, since nix paths are
@@ -411,7 +419,7 @@ in {
       databaseCreateLocally = mkOption {
         type = types.bool;
         default = true;
-        description = lib.mdDoc ''
+        description = ''
           Whether a database should be automatically created on the
           local host. Set this to `false` if you plan
           on provisioning a local database yourself. This has no effect
@@ -422,32 +430,32 @@ in {
       databaseName = mkOption {
         type = types.str;
         default = "gitlab";
-        description = lib.mdDoc "GitLab database name.";
+        description = "GitLab database name.";
       };
 
       databaseUsername = mkOption {
         type = types.str;
         default = "gitlab";
-        description = lib.mdDoc "GitLab database user.";
+        description = "GitLab database user.";
       };
 
       databasePool = mkOption {
         type = types.int;
         default = 5;
-        description = lib.mdDoc "Database connection pool size.";
+        description = "Database connection pool size.";
       };
 
       extraDatabaseConfig = mkOption {
         type = types.attrs;
         default = {};
-        description = lib.mdDoc "Extra configuration in config/database.yml.";
+        description = "Extra configuration in config/database.yml.";
       };
 
       redisUrl = mkOption {
         type = types.str;
         default = "unix:/run/gitlab/redis.sock";
         example = "redis://localhost:6379/";
-        description = lib.mdDoc "Redis URL for all GitLab services.";
+        description = "Redis URL for all GitLab services.";
       };
 
       extraGitlabRb = mkOption {
@@ -463,7 +471,7 @@ in {
             }
           end
         '';
-        description = lib.mdDoc ''
+        description = ''
           Extra configuration to be placed in config/extra-gitlab.rb. This can
           be used to add configuration not otherwise exposed through this module's
           options.
@@ -474,13 +482,13 @@ in {
         type = types.str;
         default = config.networking.hostName;
         defaultText = literalExpression "config.networking.hostName";
-        description = lib.mdDoc "GitLab host name. Used e.g. for copy-paste URLs.";
+        description = "GitLab host name. Used e.g. for copy-paste URLs.";
       };
 
       port = mkOption {
         type = types.port;
         default = 8080;
-        description = lib.mdDoc ''
+        description = ''
           GitLab server port for copy-paste URLs, e.g. 80 or 443 if you're
           service over https.
         '';
@@ -489,25 +497,25 @@ in {
       https = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether gitlab prints URLs with https as scheme.";
+        description = "Whether gitlab prints URLs with https as scheme.";
       };
 
       user = mkOption {
         type = types.str;
         default = "gitlab";
-        description = lib.mdDoc "User to run gitlab and all related services.";
+        description = "User to run gitlab and all related services.";
       };
 
       group = mkOption {
         type = types.str;
         default = "gitlab";
-        description = lib.mdDoc "Group to run gitlab and all related services.";
+        description = "Group to run gitlab and all related services.";
       };
 
       initialRootEmail = mkOption {
         type = types.str;
         default = "admin@local.host";
-        description = lib.mdDoc ''
+        description = ''
           Initial email address of the root account if this is a new install.
         '';
       };
@@ -515,7 +523,7 @@ in {
       initialRootPasswordFile = mkOption {
         type = with types; nullOr path;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           File containing the initial password of the root account if
           this is a new install.
 
@@ -528,7 +536,7 @@ in {
         enable = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Enable GitLab container registry.";
+          description = "Enable GitLab container registry.";
         };
         package = mkOption {
           type = types.package;
@@ -537,7 +545,7 @@ in {
             then pkgs.gitlab-container-registry
             else pkgs.docker-distribution;
           defaultText = literalExpression "pkgs.docker-distribution";
-          description = lib.mdDoc ''
+          description = ''
             Container registry package to use.
 
             External container registries such as `pkgs.docker-distribution` are not supported
@@ -548,45 +556,45 @@ in {
           type = types.str;
           default = config.services.gitlab.host;
           defaultText = literalExpression "config.services.gitlab.host";
-          description = lib.mdDoc "GitLab container registry host name.";
+          description = "GitLab container registry host name.";
         };
         port = mkOption {
           type = types.port;
           default = 4567;
-          description = lib.mdDoc "GitLab container registry port.";
+          description = "GitLab container registry port.";
         };
         certFile = mkOption {
           type = types.path;
-          description = lib.mdDoc "Path to GitLab container registry certificate.";
+          description = "Path to GitLab container registry certificate.";
         };
         keyFile = mkOption {
           type = types.path;
-          description = lib.mdDoc "Path to GitLab container registry certificate-key.";
+          description = "Path to GitLab container registry certificate-key.";
         };
         defaultForProjects = mkOption {
           type = types.bool;
           default = cfg.registry.enable;
           defaultText = literalExpression "config.${opt.registry.enable}";
-          description = lib.mdDoc "If GitLab container registry should be enabled by default for projects.";
+          description = "If GitLab container registry should be enabled by default for projects.";
         };
         issuer = mkOption {
           type = types.str;
           default = "gitlab-issuer";
-          description = lib.mdDoc "GitLab container registry issuer.";
+          description = "GitLab container registry issuer.";
         };
         serviceName = mkOption {
           type = types.str;
           default = "container_registry";
-          description = lib.mdDoc "GitLab container registry service name.";
+          description = "GitLab container registry service name.";
         };
         externalAddress = mkOption {
           type = types.str;
           default = "";
-          description = lib.mdDoc "External address used to access registry from the internet";
+          description = "External address used to access registry from the internet";
         };
         externalPort = mkOption {
           type = types.int;
-          description = lib.mdDoc "External port used to access registry from the internet";
+          description = "External port used to access registry from the internet";
         };
       };
 
@@ -594,31 +602,31 @@ in {
         enable = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Enable gitlab mail delivery over SMTP.";
+          description = "Enable gitlab mail delivery over SMTP.";
         };
 
         address = mkOption {
           type = types.str;
           default = "localhost";
-          description = lib.mdDoc "Address of the SMTP server for GitLab.";
+          description = "Address of the SMTP server for GitLab.";
         };
 
         port = mkOption {
           type = types.port;
           default = 25;
-          description = lib.mdDoc "Port of the SMTP server for GitLab.";
+          description = "Port of the SMTP server for GitLab.";
         };
 
         username = mkOption {
           type = with types; nullOr str;
           default = null;
-          description = lib.mdDoc "Username of the SMTP server for GitLab.";
+          description = "Username of the SMTP server for GitLab.";
         };
 
         passwordFile = mkOption {
           type = types.nullOr types.path;
           default = null;
-          description = lib.mdDoc ''
+          description = ''
             File containing the password of the SMTP server for GitLab.
 
             This should be a string, not a nix path, since nix paths
@@ -629,35 +637,35 @@ in {
         domain = mkOption {
           type = types.str;
           default = "localhost";
-          description = lib.mdDoc "HELO domain to use for outgoing mail.";
+          description = "HELO domain to use for outgoing mail.";
         };
 
         authentication = mkOption {
           type = with types; nullOr str;
           default = null;
-          description = lib.mdDoc "Authentication type to use, see http://api.rubyonrails.org/classes/ActionMailer/Base.html";
+          description = "Authentication type to use, see http://api.rubyonrails.org/classes/ActionMailer/Base.html";
         };
 
         enableStartTLSAuto = mkOption {
           type = types.bool;
           default = true;
-          description = lib.mdDoc "Whether to try to use StartTLS.";
+          description = "Whether to try to use StartTLS.";
         };
 
         tls = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Whether to use TLS wrapper-mode.";
+          description = "Whether to use TLS wrapper-mode.";
         };
 
         opensslVerifyMode = mkOption {
           type = types.str;
           default = "peer";
-          description = lib.mdDoc "How OpenSSL checks the certificate, see http://api.rubyonrails.org/classes/ActionMailer/Base.html";
+          description = "How OpenSSL checks the certificate, see http://api.rubyonrails.org/classes/ActionMailer/Base.html";
         };
       };
 
-      pages.enable = mkEnableOption (lib.mdDoc "the GitLab Pages service");
+      pages.enable = mkEnableOption "the GitLab Pages service";
 
       pages.settings = mkOption {
         example = literalExpression ''
@@ -671,7 +679,7 @@ in {
           }
         '';
 
-        description = lib.mdDoc ''
+        description = ''
           Configuration options to set in the GitLab Pages config
           file.
 
@@ -693,7 +701,7 @@ in {
               type = with types; listOf str;
               apply = x: if x == [] then null else lib.concatStringsSep "," x;
               default = [];
-              description = lib.mdDoc ''
+              description = ''
                 The address(es) to listen on for HTTP requests.
               '';
             };
@@ -702,7 +710,7 @@ in {
               type = with types; listOf str;
               apply = x: if x == [] then null else lib.concatStringsSep "," x;
               default = [];
-              description = lib.mdDoc ''
+              description = ''
                 The address(es) to listen on for HTTPS requests.
               '';
             };
@@ -711,7 +719,7 @@ in {
               type = with types; listOf str;
               apply = x: if x == [] then null else lib.concatStringsSep "," x;
               default = [ "127.0.0.1:8090" ];
-              description = lib.mdDoc ''
+              description = ''
                 The address(es) to listen on for proxy requests.
               '';
             };
@@ -721,7 +729,7 @@ in {
               default = "http${optionalString cfg.https "s"}://${cfg.host}/api/v4";
               defaultText = "http(s)://<services.gitlab.host>/api/v4";
               example = "https://gitlab.example.com/api/v4";
-              description = lib.mdDoc ''
+              description = ''
                 API URL to proxy artifact requests to.
               '';
             };
@@ -731,7 +739,7 @@ in {
               default = "http${optionalString cfg.https "s"}://${cfg.host}";
               defaultText = "http(s)://<services.gitlab.host>";
               example = "https://gitlab.example.com";
-              description = lib.mdDoc ''
+              description = ''
                 Public GitLab server URL.
               '';
             };
@@ -741,7 +749,7 @@ in {
               default = null;
               defaultText = "http(s)://<services.gitlab.host>";
               example = "https://gitlab.example.internal";
-              description = lib.mdDoc ''
+              description = ''
                 Internal GitLab server used for API requests, useful
                 if you want to send that traffic over an internal load
                 balancer. By default, the value of
@@ -754,7 +762,7 @@ in {
               type = with types; nullOr str;
               default = "${cfg.statePath}/gitlab_pages_secret";
               internal = true;
-              description = lib.mdDoc ''
+              description = ''
                 File with secret key used to authenticate with the
                 GitLab API.
               '';
@@ -763,7 +771,7 @@ in {
             pages-domain = mkOption {
               type = with types; nullOr str;
               example = "example.com";
-              description = lib.mdDoc ''
+              description = ''
                 The domain to serve static pages on.
               '';
             };
@@ -772,7 +780,7 @@ in {
               type = types.str;
               default = "${gitlabConfig.production.shared.path}/pages";
               defaultText = literalExpression ''config.${opt.extraConfig}.production.shared.path + "/pages"'';
-              description = lib.mdDoc ''
+              description = ''
                 The directory where pages are stored.
               '';
             };
@@ -783,7 +791,7 @@ in {
       secrets.secretFile = mkOption {
         type = with types; nullOr path;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           A file containing the secret used to encrypt variables in
           the DB. If you change or lose this key you will be unable to
           access variables stored in database.
@@ -799,7 +807,7 @@ in {
       secrets.dbFile = mkOption {
         type = with types; nullOr path;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           A file containing the secret used to encrypt variables in
           the DB. If you change or lose this key you will be unable to
           access variables stored in database.
@@ -815,7 +823,7 @@ in {
       secrets.otpFile = mkOption {
         type = with types; nullOr path;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           A file containing the secret used to encrypt secrets for OTP
           tokens. If you change or lose this key, users which have 2FA
           enabled for login won't be able to login anymore.
@@ -831,7 +839,7 @@ in {
       secrets.jwsFile = mkOption {
         type = with types; nullOr path;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           A file containing the secret used to encrypt session
           keys. If you change or lose this key, users will be
           disconnected.
@@ -849,14 +857,14 @@ in {
       extraShellConfig = mkOption {
         type = types.attrs;
         default = {};
-        description = lib.mdDoc "Extra configuration to merge into shell-config.yml";
+        description = "Extra configuration to merge into shell-config.yml";
       };
 
       puma.workers = mkOption {
         type = types.int;
         default = 2;
         apply = x: builtins.toString x;
-        description = lib.mdDoc ''
+        description = ''
           The number of worker processes Puma should spawn. This
           controls the amount of parallel Ruby code can be
           executed. GitLab recommends `Number of CPU cores - 1`, but at least two.
@@ -872,7 +880,7 @@ in {
         type = types.int;
         default = 0;
         apply = x: builtins.toString x;
-        description = lib.mdDoc ''
+        description = ''
           The minimum number of threads Puma should use per
           worker.
 
@@ -887,7 +895,7 @@ in {
         type = types.int;
         default = 4;
         apply = x: builtins.toString x;
-        description = lib.mdDoc ''
+        description = ''
           The maximum number of threads Puma should use per
           worker. This limits how many threads Puma will automatically
           spawn in response to requests. In contrast to workers,
@@ -901,10 +909,20 @@ in {
         '';
       };
 
+      sidekiq.concurrency = mkOption {
+        type = with types; nullOr int;
+        default = null;
+        description = ''
+          How many processor threads to use for processing sidekiq background job queues. When null, the GitLab default is used.
+
+          See <https://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#manage-thread-counts-explicitly> for details.
+        '';
+      };
+
       sidekiq.memoryKiller.enable = mkOption {
         type = types.bool;
         default = true;
-        description = lib.mdDoc ''
+        description = ''
           Whether the Sidekiq MemoryKiller should be turned
           on. MemoryKiller kills Sidekiq when its memory consumption
           exceeds a certain limit.
@@ -918,7 +936,7 @@ in {
         type = types.int;
         default = 2000;
         apply = x: builtins.toString (x * 1024);
-        description = lib.mdDoc ''
+        description = ''
           The maximum amount of memory, in MiB, a Sidekiq worker is
           allowed to consume before being killed.
         '';
@@ -928,7 +946,7 @@ in {
         type = types.int;
         default = 900;
         apply = x: builtins.toString x;
-        description = lib.mdDoc ''
+        description = ''
           The time MemoryKiller waits after noticing excessive memory
           consumption before killing Sidekiq.
         '';
@@ -938,7 +956,7 @@ in {
         type = types.int;
         default = 30;
         apply = x: builtins.toString x;
-        description = lib.mdDoc ''
+        description = ''
           The time allowed for all jobs to finish before Sidekiq is
           killed forcefully.
         '';
@@ -948,7 +966,7 @@ in {
         enable = mkOption {
           type = types.bool;
           default = true;
-          description = lib.mdDoc ''
+          description = ''
             Enable rotation of log files.
           '';
         };
@@ -956,13 +974,13 @@ in {
         frequency = mkOption {
           type = types.str;
           default = "daily";
-          description = lib.mdDoc "How often to rotate the logs.";
+          description = "How often to rotate the logs.";
         };
 
         keep = mkOption {
           type = types.int;
           default = 30;
-          description = lib.mdDoc "How many rotations to keep.";
+          description = "How many rotations to keep.";
         };
       };
 
@@ -978,7 +996,7 @@ in {
             };
           };
         '';
-        description = lib.mdDoc ''
+        description = ''
           Configuration options to add to Workhorse's configuration
           file.
 
@@ -1037,7 +1055,7 @@ in {
             };
           };
         '';
-        description = lib.mdDoc ''
+        description = ''
           Extra options to be added under
           `production` in
           {file}`config/gitlab.yml`, as a nix attribute
@@ -1158,7 +1176,7 @@ in {
         set -eu
 
         PSQL() {
-            psql --port=${toString pgsql.port} "$@"
+            psql --port=${toString pgsql.settings.port} "$@"
         }
 
         PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${cfg.databaseName}'" | grep -q 1 || PSQL -tAc 'CREATE DATABASE "${cfg.databaseName}" OWNER "${cfg.databaseUsername}"'
@@ -1338,7 +1356,7 @@ in {
 
             rm -f '${cfg.statePath}/config/database.yml'
 
-            ${if cfg.databasePasswordFile != null then ''
+            ${lib.optionalString (cfg.databasePasswordFile != null) ''
                 db_password="$(<'${cfg.databasePasswordFile}')"
                 export db_password
 
@@ -1346,16 +1364,24 @@ in {
                   >&2 echo "Database password was an empty string!"
                   exit 1
                 fi
+            ''}
 
-                jq <${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)} \
-                   '.${if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then "production.main" else "production"}.password = $ENV.db_password' \
-                   >'${cfg.statePath}/config/database.yml'
-              ''
-              else ''
-                jq <${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)} \
-                   >'${cfg.statePath}/config/database.yml'
-              ''
-            }
+            # GitLab expects the `production.main` section to be the first entry in the file.
+            jq <${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)} '{
+              production: [
+                ${lib.optionalString (cfg.databasePasswordFile != null) (
+                  builtins.concatStringsSep "\n      " (
+                    [ ".production${lib.optionalString (gitlabVersionAtLeast "15.0") ".main"}.password = $ENV.db_password" ]
+                    ++ lib.optional (gitlabVersionAtLeast "15.9") "| .production.ci.password = $ENV.db_password"
+                    ++ [ "|" ]
+                  )
+                )} .production
+                | to_entries[]
+              ]
+              | sort_by(.key)
+              | reverse
+              | from_entries
+            }' >'${cfg.statePath}/config/database.yml'
 
             ${utils.genJqSecretsReplacementSnippet
                 gitlabConfig
@@ -1454,12 +1480,17 @@ in {
         TimeoutSec = "infinity";
         Restart = "always";
         WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab";
-        ExecStart = utils.escapeSystemdExecArgs [
-          "${cfg.packages.gitlab}/share/gitlab/bin/sidekiq-cluster"
-          "-e" "production"
-          "-r" "."
-          "*" # all queue groups
-        ];
+        ExecStart = utils.escapeSystemdExecArgs (
+          [
+            "${cfg.packages.gitlab}/share/gitlab/bin/sidekiq-cluster"
+            "*" # all queue groups
+          ] ++ lib.optionals (cfg.sidekiq.concurrency != null) [
+            "--concurrency" (toString cfg.sidekiq.concurrency)
+          ] ++ [
+            "--environment" "production"
+            "--require" "."
+          ]
+        );
       };
     };
 
@@ -1578,7 +1609,9 @@ in {
           rm "${cfg.statePath}/config/gitlab-workhorse.json"
         '';
         ExecStart =
-          "${cfg.packages.gitlab-workhorse}/bin/workhorse "
+          "${cfg.packages.gitlab-workhorse}/bin/${
+              optionalString (lib.versionAtLeast (lib.getVersion cfg.packages.gitlab-workhorse) "16.10") "gitlab-"
+            }workhorse "
           + "-listenUmask 0 "
           + "-listenNetwork unix "
           + "-listenAddr /run/gitlab/gitlab-workhorse.socket "
diff --git a/nixpkgs/nixos/modules/services/misc/gitolite.nix b/nixpkgs/nixos/modules/services/misc/gitolite.nix
index 012abda2d76f..89f72c046755 100644
--- a/nixpkgs/nixos/modules/services/misc/gitolite.nix
+++ b/nixpkgs/nixos/modules/services/misc/gitolite.nix
@@ -14,7 +14,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Enable gitolite management under the
           `gitolite` user. After
           switching to a configuration with Gitolite enabled, you can
@@ -25,7 +25,7 @@ in
       dataDir = mkOption {
         type = types.str;
         default = "/var/lib/gitolite";
-        description = lib.mdDoc ''
+        description = ''
           The gitolite home directory used to store all repositories. If left as the default value
           this directory will automatically be created before the gitolite server starts, otherwise
           the sysadmin is responsible for ensuring the directory exists with appropriate ownership
@@ -35,7 +35,7 @@ in
 
       adminPubkey = mkOption {
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           Initial administrative public key for Gitolite. This should
           be an SSH Public Key. Note that this key will only be used
           once, upon the first initialization of the Gitolite user.
@@ -46,7 +46,7 @@ in
       enableGitAnnex = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Enable git-annex support. Uses the `extraGitoliteRc` option
           to apply the necessary configuration.
         '';
@@ -55,7 +55,7 @@ in
       commonHooks = mkOption {
         type = types.listOf types.path;
         default = [];
-        description = lib.mdDoc ''
+        description = ''
           A list of custom git hooks that get copied to `~/.gitolite/hooks/common`.
         '';
       };
@@ -71,7 +71,7 @@ in
             @{$RC{ENABLE}} = grep { $_ ne 'desc' } @{$RC{ENABLE}}; # disable the command/feature
           '''
         '';
-        description = lib.mdDoc ''
+        description = ''
           Extra configuration to append to the default `~/.gitolite.rc`.
 
           This should be Perl code that modifies the `%RC`
@@ -96,7 +96,7 @@ in
       user = mkOption {
         type = types.str;
         default = "gitolite";
-        description = lib.mdDoc ''
+        description = ''
           Gitolite user account. This is the username of the gitolite endpoint.
         '';
       };
@@ -104,7 +104,7 @@ in
       description = mkOption {
         type = types.str;
         default = "Gitolite user";
-        description = lib.mdDoc ''
+        description = ''
           Gitolite user account's description.
         '';
       };
@@ -112,7 +112,7 @@ in
       group = mkOption {
         type = types.str;
         default = "gitolite";
-        description = lib.mdDoc ''
+        description = ''
           Primary group of the Gitolite user account.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/gitweb.nix b/nixpkgs/nixos/modules/services/misc/gitweb.nix
index aac0dac8a080..ec08ab51a457 100644
--- a/nixpkgs/nixos/modules/services/misc/gitweb.nix
+++ b/nixpkgs/nixos/modules/services/misc/gitweb.nix
@@ -13,7 +13,7 @@ in
     projectroot = mkOption {
       default = "/srv/git";
       type = types.path;
-      description = lib.mdDoc ''
+      description = ''
         Path to git projects (bare repositories) that should be served by
         gitweb. Must not end with a slash.
       '';
@@ -22,7 +22,7 @@ in
     extraConfig = mkOption {
       default = "";
       type = types.lines;
-      description = lib.mdDoc ''
+      description = ''
         Verbatim configuration text appended to the generated gitweb.conf file.
       '';
       example = ''
@@ -35,7 +35,7 @@ in
     gitwebTheme = mkOption {
       default = false;
       type = types.bool;
-      description = lib.mdDoc ''
+      description = ''
         Use an alternative theme for gitweb, strongly inspired by GitHub.
       '';
     };
diff --git a/nixpkgs/nixos/modules/services/misc/gogs.nix b/nixpkgs/nixos/modules/services/misc/gogs.nix
index 9bf7e4aab814..e4e23d597237 100644
--- a/nixpkgs/nixos/modules/services/misc/gogs.nix
+++ b/nixpkgs/nixos/modules/services/misc/gogs.nix
@@ -48,31 +48,31 @@ in
       enable = mkOption {
         default = false;
         type = types.bool;
-        description = lib.mdDoc "Enable Go Git Service.";
+        description = "Enable Go Git Service.";
       };
 
       useWizard = mkOption {
         default = false;
         type = types.bool;
-        description = lib.mdDoc "Do not generate a configuration and use Gogs' installation wizard instead. The first registered user will be administrator.";
+        description = "Do not generate a configuration and use Gogs' installation wizard instead. The first registered user will be administrator.";
       };
 
       stateDir = mkOption {
         default = "/var/lib/gogs";
         type = types.str;
-        description = lib.mdDoc "Gogs data directory.";
+        description = "Gogs data directory.";
       };
 
       user = mkOption {
         type = types.str;
         default = "gogs";
-        description = lib.mdDoc "User account under which Gogs runs.";
+        description = "User account under which Gogs runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "gogs";
-        description = lib.mdDoc "Group account under which Gogs runs.";
+        description = "Group account under which Gogs runs.";
       };
 
       database = {
@@ -80,37 +80,37 @@ in
           type = types.enum [ "sqlite3" "mysql" "postgres" ];
           example = "mysql";
           default = "sqlite3";
-          description = lib.mdDoc "Database engine to use.";
+          description = "Database engine to use.";
         };
 
         host = mkOption {
           type = types.str;
           default = "127.0.0.1";
-          description = lib.mdDoc "Database host address.";
+          description = "Database host address.";
         };
 
         port = mkOption {
           type = types.port;
           default = 3306;
-          description = lib.mdDoc "Database host port.";
+          description = "Database host port.";
         };
 
         name = mkOption {
           type = types.str;
           default = "gogs";
-          description = lib.mdDoc "Database name.";
+          description = "Database name.";
         };
 
         user = mkOption {
           type = types.str;
           default = "gogs";
-          description = lib.mdDoc "Database user.";
+          description = "Database user.";
         };
 
         password = mkOption {
           type = types.str;
           default = "";
-          description = lib.mdDoc ''
+          description = ''
             The password corresponding to {option}`database.user`.
             Warning: this is stored in cleartext in the Nix store!
             Use {option}`database.passwordFile` instead.
@@ -121,7 +121,7 @@ in
           type = types.nullOr types.path;
           default = null;
           example = "/run/keys/gogs-dbpassword";
-          description = lib.mdDoc ''
+          description = ''
             A file containing the password corresponding to
             {option}`database.user`.
           '';
@@ -131,51 +131,51 @@ in
           type = types.str;
           default = "${cfg.stateDir}/data/gogs.db";
           defaultText = literalExpression ''"''${config.${opt.stateDir}}/data/gogs.db"'';
-          description = lib.mdDoc "Path to the sqlite3 database file.";
+          description = "Path to the sqlite3 database file.";
         };
       };
 
       appName = mkOption {
         type = types.str;
         default = "Gogs: Go Git Service";
-        description = lib.mdDoc "Application name.";
+        description = "Application name.";
       };
 
       repositoryRoot = mkOption {
         type = types.str;
         default = "${cfg.stateDir}/repositories";
         defaultText = literalExpression ''"''${config.${opt.stateDir}}/repositories"'';
-        description = lib.mdDoc "Path to the git repositories.";
+        description = "Path to the git repositories.";
       };
 
       domain = mkOption {
         type = types.str;
         default = "localhost";
-        description = lib.mdDoc "Domain name of your server.";
+        description = "Domain name of your server.";
       };
 
       rootUrl = mkOption {
         type = types.str;
         default = "http://localhost:3000/";
-        description = lib.mdDoc "Full public URL of Gogs server.";
+        description = "Full public URL of Gogs server.";
       };
 
       httpAddress = mkOption {
         type = types.str;
         default = "0.0.0.0";
-        description = lib.mdDoc "HTTP listen address.";
+        description = "HTTP listen address.";
       };
 
       httpPort = mkOption {
         type = types.port;
         default = 3000;
-        description = lib.mdDoc "HTTP listen port.";
+        description = "HTTP listen port.";
       };
 
       cookieSecure = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Marks session cookies as "secure" as a hint for browsers to only send
           them via HTTPS. This option is recommend, if Gogs is being served over HTTPS.
         '';
@@ -184,7 +184,7 @@ in
       extraConfig = mkOption {
         type = types.str;
         default = "";
-        description = lib.mdDoc "Configuration lines appended to the generated Gogs configuration file.";
+        description = "Configuration lines appended to the generated Gogs configuration file.";
       };
     };
   };
@@ -217,7 +217,6 @@ in
           sed -e "s,#secretkey#,$KEY,g" \
               -e "s,#dbpass#,$DBPASS,g" \
               -i ${runConfig}
-          chmod 440 ${runConfig} ${secretKey}
         ''}
 
         mkdir -p ${cfg.repositoryRoot}
@@ -239,6 +238,7 @@ in
         WorkingDirectory = cfg.stateDir;
         ExecStart = "${pkgs.gogs}/bin/gogs web";
         Restart = "always";
+        UMask = "0027";
       };
 
       environment = {
diff --git a/nixpkgs/nixos/modules/services/misc/gollum.nix b/nixpkgs/nixos/modules/services/misc/gollum.nix
index e31eeaf8a30a..3966ef036bec 100644
--- a/nixpkgs/nixos/modules/services/misc/gollum.nix
+++ b/nixpkgs/nixos/modules/services/misc/gollum.nix
@@ -8,79 +8,79 @@ in
 
 {
   options.services.gollum = {
-    enable = mkEnableOption (lib.mdDoc "Gollum service");
+    enable = mkEnableOption "Gollum, a git-powered wiki service";
 
     address = mkOption {
       type = types.str;
       default = "0.0.0.0";
-      description = lib.mdDoc "IP address on which the web server will listen.";
+      description = "IP address on which the web server will listen.";
     };
 
     port = mkOption {
       type = types.port;
       default = 4567;
-      description = lib.mdDoc "Port on which the web server will run.";
+      description = "Port on which the web server will run.";
     };
 
     extraConfig = mkOption {
       type = types.lines;
       default = "";
-      description = lib.mdDoc "Content of the configuration file";
+      description = "Content of the configuration file";
     };
 
     mathjax = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Enable support for math rendering using MathJax";
+      description = "Enable support for math rendering using MathJax";
     };
 
     allowUploads = mkOption {
       type = types.nullOr (types.enum [ "dir" "page" ]);
       default = null;
-      description = lib.mdDoc "Enable uploads of external files";
+      description = "Enable uploads of external files";
     };
 
     user-icons = mkOption {
       type = types.nullOr (types.enum [ "gravatar" "identicon" ]);
       default = null;
-      description = lib.mdDoc "Enable specific user icons for history view";
+      description = "Enable specific user icons for history view";
     };
 
     emoji = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Parse and interpret emoji tags";
+      description = "Parse and interpret emoji tags";
     };
 
     h1-title = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Use the first h1 as page title";
+      description = "Use the first h1 as page title";
     };
 
     no-edit = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Disable editing pages";
+      description = "Disable editing pages";
     };
 
     local-time = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Use the browser's local timezone instead of the server's for displaying dates.";
+      description = "Use the browser's local timezone instead of the server's for displaying dates.";
     };
 
     branch = mkOption {
       type = types.str;
       default = "master";
       example = "develop";
-      description = lib.mdDoc "Git branch to serve";
+      description = "Git branch to serve";
     };
 
     stateDir = mkOption {
       type = types.path;
       default = "/var/lib/gollum";
-      description = lib.mdDoc "Specifies the path of the repository directory. If it does not exist, Gollum will create it on startup.";
+      description = "Specifies the path of the repository directory. If it does not exist, Gollum will create it on startup.";
     };
 
     package = mkPackageOption pkgs "gollum" { };
@@ -88,13 +88,13 @@ in
     user = mkOption {
       type = types.str;
       default = "gollum";
-      description = lib.mdDoc "Specifies the owner of the wiki directory";
+      description = "Specifies the owner of the wiki directory";
     };
 
     group = mkOption {
       type = types.str;
       default = "gollum";
-      description = lib.mdDoc "Specifies the owner group of the wiki directory";
+      description = "Specifies the owner group of the wiki directory";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/misc/gpsd.nix b/nixpkgs/nixos/modules/services/misc/gpsd.nix
index 5d2e806181df..6f7aec0784a0 100644
--- a/nixpkgs/nixos/modules/services/misc/gpsd.nix
+++ b/nixpkgs/nixos/modules/services/misc/gpsd.nix
@@ -24,7 +24,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable `gpsd`, a GPS service daemon.
         '';
       };
@@ -32,7 +32,7 @@ in {
       devices = mkOption {
         type = types.listOf types.str;
         default = [ "/dev/ttyUSB0" ];
-        description = lib.mdDoc ''
+        description = ''
           List of devices that `gpsd` should subscribe to.
 
           A device may be a local serial device for GPS input, or a
@@ -46,7 +46,7 @@ in {
       readonly = mkOption {
         type = types.bool;
         default = true;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable the broken-device-safety, otherwise
           known as read-only mode.  Some popular bluetooth and USB
           receivers lock up or become totally inaccessible when
@@ -63,7 +63,7 @@ in {
       nowait = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           don't wait for client connects to poll GPS
         '';
       };
@@ -71,7 +71,7 @@ in {
       port = mkOption {
         type = types.port;
         default = 2947;
-        description = lib.mdDoc ''
+        description = ''
           The port where to listen for TCP connections.
         '';
       };
@@ -79,7 +79,7 @@ in {
       debugLevel = mkOption {
         type = types.int;
         default = 0;
-        description = lib.mdDoc ''
+        description = ''
           The debugging level.
         '';
       };
@@ -87,7 +87,7 @@ in {
       listenany = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Listen on all addresses rather than just loopback.
         '';
       };
@@ -96,7 +96,7 @@ in {
         type = types.listOf types.str;
         default = [ ];
         example = [ "-r" "-s" "19200" ];
-        description = lib.mdDoc ''
+        description = ''
           A list of extra command line arguments to pass to gpsd.
           Check gpsd(8) mangpage for possible arguments.
         '';
diff --git a/nixpkgs/nixos/modules/services/misc/graphical-desktop.nix b/nixpkgs/nixos/modules/services/misc/graphical-desktop.nix
new file mode 100644
index 000000000000..a88c02e610bf
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/misc/graphical-desktop.nix
@@ -0,0 +1,54 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+let
+  xcfg = config.services.xserver;
+  dmcfg = config.services.displayManager;
+in
+{
+  config = lib.mkIf (xcfg.enable || dmcfg.enable) {
+    # The default max inotify watches is 8192.
+    # Nowadays most apps require a good number of inotify watches,
+    # the value below is used by default on several other distros.
+    boot.kernel.sysctl = {
+      "fs.inotify.max_user_instances" = lib.mkDefault 524288;
+      "fs.inotify.max_user_watches" = lib.mkDefault 524288;
+    };
+
+    environment = {
+      # localectl looks into 00-keyboard.conf
+      etc."X11/xorg.conf.d/00-keyboard.conf".text = ''
+        Section "InputClass"
+          Identifier "Keyboard catchall"
+          MatchIsKeyboard "on"
+          Option "XkbModel" "${xcfg.xkb.model}"
+          Option "XkbLayout" "${xcfg.xkb.layout}"
+          Option "XkbOptions" "${xcfg.xkb.options}"
+          Option "XkbVariant" "${xcfg.xkb.variant}"
+        EndSection
+      '';
+      systemPackages = with pkgs; [
+        nixos-icons # needed for gnome and pantheon about dialog, nixos-manual and maybe more
+        xdg-utils
+      ];
+    };
+
+    fonts.enableDefaultPackages = lib.mkDefault true;
+
+    hardware.opengl.enable = lib.mkDefault true;
+
+    programs.gnupg.agent.pinentryPackage = lib.mkOverride 1100 pkgs.pinentry-gnome3;
+
+    systemd.defaultUnit = lib.mkIf (xcfg.autorun || dmcfg.enable) "graphical.target";
+
+    xdg = {
+      autostart.enable = true;
+      menus.enable = true;
+      mime.enable = true;
+      icons.enable = true;
+    };
+  };
+}
diff --git a/nixpkgs/nixos/modules/services/misc/greenclip.nix b/nixpkgs/nixos/modules/services/misc/greenclip.nix
index ecfb864ab2b7..d92cd1854877 100644
--- a/nixpkgs/nixos/modules/services/misc/greenclip.nix
+++ b/nixpkgs/nixos/modules/services/misc/greenclip.nix
@@ -7,7 +7,7 @@ let
 in {
 
   options.services.greenclip = {
-    enable = mkEnableOption (lib.mdDoc "Greenclip daemon");
+    enable = mkEnableOption "Greenclip, a clipboard manager";
 
     package = mkPackageOption pkgs [ "haskellPackages" "greenclip" ] { };
   };
@@ -18,7 +18,10 @@ in {
       description = "greenclip daemon";
       wantedBy = [ "graphical-session.target" ];
       after    = [ "graphical-session.target" ];
-      serviceConfig.ExecStart = "${cfg.package}/bin/greenclip daemon";
+      serviceConfig = {
+        ExecStart = "${cfg.package}/bin/greenclip daemon";
+        Restart = "always";
+      };
     };
 
     environment.systemPackages = [ cfg.package ];
diff --git a/nixpkgs/nixos/modules/services/misc/headphones.nix b/nixpkgs/nixos/modules/services/misc/headphones.nix
index 472b330fff15..31bd61cb4c20 100644
--- a/nixpkgs/nixos/modules/services/misc/headphones.nix
+++ b/nixpkgs/nixos/modules/services/misc/headphones.nix
@@ -20,38 +20,38 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to enable the headphones server.";
+        description = "Whether to enable the headphones server.";
       };
       dataDir = mkOption {
         type = types.path;
         default = "/var/lib/${name}";
-        description = lib.mdDoc "Path where to store data files.";
+        description = "Path where to store data files.";
       };
       configFile = mkOption {
         type = types.path;
         default = "${cfg.dataDir}/config.ini";
         defaultText = literalExpression ''"''${config.${opt.dataDir}}/config.ini"'';
-        description = lib.mdDoc "Path to config file.";
+        description = "Path to config file.";
       };
       host = mkOption {
         type = types.str;
         default = "localhost";
-        description = lib.mdDoc "Host to listen on.";
+        description = "Host to listen on.";
       };
       port = mkOption {
         type = types.ints.u16;
         default = 8181;
-        description = lib.mdDoc "Port to bind to.";
+        description = "Port to bind to.";
       };
       user = mkOption {
         type = types.str;
         default = name;
-        description = lib.mdDoc "User to run the service as";
+        description = "User to run the service as";
       };
       group = mkOption {
         type = types.str;
         default = name;
-        description = lib.mdDoc "Group to run the service as";
+        description = "Group to run the service as";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/heisenbridge.nix b/nixpkgs/nixos/modules/services/misc/heisenbridge.nix
index d7ce9c605c9e..de109e726633 100644
--- a/nixpkgs/nixos/modules/services/misc/heisenbridge.nix
+++ b/nixpkgs/nixos/modules/services/misc/heisenbridge.nix
@@ -23,19 +23,19 @@ let
 in
 {
   options.services.heisenbridge = {
-    enable = mkEnableOption (lib.mdDoc "the Matrix to IRC bridge");
+    enable = mkEnableOption "the Matrix to IRC bridge";
 
     package = mkPackageOption pkgs "heisenbridge" { };
 
     homeserver = mkOption {
       type = types.str;
-      description = lib.mdDoc "The URL to the home server for client-server API calls";
+      description = "The URL to the home server for client-server API calls";
       example = "http://localhost:8008";
     };
 
     registrationUrl = mkOption {
       type = types.str;
-      description = lib.mdDoc ''
+      description = ''
         The URL where the application service is listening for HS requests, from the Matrix HS perspective.#
         The default value assumes the bridge runs on the same host as the home server, in the same network.
       '';
@@ -46,26 +46,26 @@ in
 
     address = mkOption {
       type = types.str;
-      description = lib.mdDoc "Address to listen on. IPv6 does not seem to be supported.";
+      description = "Address to listen on. IPv6 does not seem to be supported.";
       default = "127.0.0.1";
       example = "0.0.0.0";
     };
 
     port = mkOption {
       type = types.port;
-      description = lib.mdDoc "The port to listen on";
+      description = "The port to listen on";
       default = 9898;
     };
 
     debug = mkOption {
       type = types.bool;
-      description = lib.mdDoc "More verbose logging. Recommended during initial setup.";
+      description = "More verbose logging. Recommended during initial setup.";
       default = false;
     };
 
     owner = mkOption {
       type = types.nullOr types.str;
-      description = lib.mdDoc ''
+      description = ''
         Set owner MXID otherwise first talking local user will claim the bridge
       '';
       default = null;
@@ -73,7 +73,7 @@ in
     };
 
     namespaces = mkOption {
-      description = lib.mdDoc "Configure the 'namespaces' section of the registration.yml for the bridge and the server";
+      description = "Configure the 'namespaces' section of the registration.yml for the bridge and the server";
       # TODO link to Matrix documentation of the format
       type = types.submodule {
         freeformType = jsonType;
@@ -91,16 +91,16 @@ in
       };
     };
 
-    identd.enable = mkEnableOption (lib.mdDoc "identd service support");
+    identd.enable = mkEnableOption "identd service support";
     identd.port = mkOption {
       type = types.port;
-      description = lib.mdDoc "identd listen port";
+      description = "identd listen port";
       default = 113;
     };
 
     extraArgs = mkOption {
       type = types.listOf types.str;
-      description = lib.mdDoc "Heisenbridge is configured over the command line. Append extra arguments here";
+      description = "Heisenbridge is configured over the command line. Append extra arguments here";
       default = [ ];
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/homepage-dashboard.nix b/nixpkgs/nixos/modules/services/misc/homepage-dashboard.nix
index 02f1378cb0d5..29fda16aa66f 100644
--- a/nixpkgs/nixos/modules/services/misc/homepage-dashboard.nix
+++ b/nixpkgs/nixos/modules/services/misc/homepage-dashboard.nix
@@ -12,20 +12,20 @@ in
 {
   options = {
     services.homepage-dashboard = {
-      enable = lib.mkEnableOption (lib.mdDoc "Homepage Dashboard");
+      enable = lib.mkEnableOption "Homepage Dashboard, a highly customizable application dashboard";
 
       package = lib.mkPackageOption pkgs "homepage-dashboard" { };
 
       openFirewall = lib.mkOption {
         type = lib.types.bool;
         default = false;
-        description = lib.mdDoc "Open ports in the firewall for Homepage.";
+        description = "Open ports in the firewall for Homepage.";
       };
 
       listenPort = lib.mkOption {
         type = lib.types.int;
         default = 8082;
-        description = lib.mdDoc "Port for Homepage to bind to.";
+        description = "Port for Homepage to bind to.";
       };
 
       environmentFile = lib.mkOption {
@@ -44,7 +44,7 @@ in
 
       customCSS = lib.mkOption {
         type = lib.types.lines;
-        description = lib.mdDoc ''
+        description = ''
           Custom CSS for styling Homepage.
 
           See https://gethomepage.dev/latest/configs/custom-css-js/.
@@ -54,7 +54,7 @@ in
 
       customJS = lib.mkOption {
         type = lib.types.lines;
-        description = lib.mdDoc ''
+        description = ''
           Custom Javascript for Homepage.
 
           See https://gethomepage.dev/latest/configs/custom-css-js/.
@@ -64,7 +64,7 @@ in
 
       bookmarks = lib.mkOption {
         inherit (settingsFormat) type;
-        description = lib.mdDoc ''
+        description = ''
           Homepage bookmarks configuration.
 
           See https://gethomepage.dev/latest/configs/bookmarks/.
@@ -87,7 +87,7 @@ in
 
       services = lib.mkOption {
         inherit (settingsFormat) type;
-        description = lib.mdDoc ''
+        description = ''
           Homepage services configuration.
 
           See https://gethomepage.dev/latest/configs/services/.
@@ -120,7 +120,7 @@ in
 
       widgets = lib.mkOption {
         inherit (settingsFormat) type;
-        description = lib.mdDoc ''
+        description = ''
           Homepage widgets configuration.
 
           See https://gethomepage.dev/latest/configs/service-widgets/.
@@ -146,7 +146,7 @@ in
 
       kubernetes = lib.mkOption {
         inherit (settingsFormat) type;
-        description = lib.mdDoc ''
+        description = ''
           Homepage kubernetes configuration.
 
           See https://gethomepage.dev/latest/configs/kubernetes/.
@@ -156,7 +156,7 @@ in
 
       docker = lib.mkOption {
         inherit (settingsFormat) type;
-        description = lib.mdDoc ''
+        description = ''
           Homepage docker configuration.
 
           See https://gethomepage.dev/latest/configs/docker/.
@@ -166,7 +166,7 @@ in
 
       settings = lib.mkOption {
         inherit (settingsFormat) type;
-        description = lib.mdDoc ''
+        description = ''
           Homepage settings.
 
           See https://gethomepage.dev/latest/configs/settings/.
diff --git a/nixpkgs/nixos/modules/services/misc/ihaskell.nix b/nixpkgs/nixos/modules/services/misc/ihaskell.nix
index 4782053c4fb8..186ff7345ab3 100644
--- a/nixpkgs/nixos/modules/services/misc/ihaskell.nix
+++ b/nixpkgs/nixos/modules/services/misc/ihaskell.nix
@@ -17,7 +17,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Autostart an IHaskell notebook service.";
+        description = "Autostart an IHaskell notebook service.";
       };
 
       extraPackages = mkOption {
@@ -30,7 +30,7 @@ in
             haskellPackages.lens
           ]
         '';
-        description = lib.mdDoc ''
+        description = ''
           Extra packages available to ghc when running ihaskell. The
           value must be a function which receives the attrset defined
           in {var}`haskellPackages` as the sole argument.
diff --git a/nixpkgs/nixos/modules/services/misc/input-remapper.nix b/nixpkgs/nixos/modules/services/misc/input-remapper.nix
index 5b9f16e019d8..94c2ece52f98 100644
--- a/nixpkgs/nixos/modules/services/misc/input-remapper.nix
+++ b/nixpkgs/nixos/modules/services/misc/input-remapper.nix
@@ -6,14 +6,14 @@ let cfg = config.services.input-remapper; in
 {
   options = {
     services.input-remapper = {
-      enable = mkEnableOption (lib.mdDoc "input-remapper, an easy to use tool to change the mapping of your input device buttons");
+      enable = mkEnableOption "input-remapper, an easy to use tool to change the mapping of your input device buttons";
       package = mkPackageOption pkgs "input-remapper" { };
-      enableUdevRules = mkEnableOption (lib.mdDoc "udev rules added by input-remapper to handle hotplugged devices. Currently disabled by default due to https://github.com/sezanzeb/input-remapper/issues/140");
+      enableUdevRules = mkEnableOption "udev rules added by input-remapper to handle hotplugged devices. Currently disabled by default due to https://github.com/sezanzeb/input-remapper/issues/140";
       serviceWantedBy = mkOption {
         default = [ "graphical.target" ];
         example = [ "multi-user.target" ];
         type = types.listOf types.str;
-        description = lib.mdDoc "Specifies the WantedBy setting for the input-remapper service.";
+        description = "Specifies the WantedBy setting for the input-remapper service.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/invidious-router.nix b/nixpkgs/nixos/modules/services/misc/invidious-router.nix
new file mode 100644
index 000000000000..33da7e96b523
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/misc/invidious-router.nix
@@ -0,0 +1,121 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}: let
+  cfg = config.services.invidious-router;
+  settingsFormat = pkgs.formats.yaml {};
+  configFile = settingsFormat.generate "config.yaml" cfg.settings;
+in {
+  meta.maintainers = [lib.maintainers.s1ls];
+
+  options.services.invidious-router = {
+    enable = lib.mkEnableOption "Enables the invidious-router service";
+    port = lib.mkOption {
+      type = lib.types.port;
+      default = 8050;
+      description = ''
+        Port to bind to.
+      '';
+    };
+    address = lib.mkOption {
+      type = lib.types.str;
+      default = "127.0.0.1";
+      description = ''
+        Address on which invidious-router should listen on.
+      '';
+    };
+    settings = lib.mkOption {
+      type = lib.types.submodule {
+        freeformType = settingsFormat.type;
+      };
+      default = {
+        app = {
+          listen = "127.0.0.1:8050";
+          enable_youtube_fallback = false;
+          reload_instance_list_interval = "60s";
+        };
+        api = {
+          enabled = true;
+          url = "https://api.invidious.io/instances.json";
+          filter_regions = true;
+          allowed_regions = [
+            "AT"
+            "DE"
+            "CH"
+          ];
+        };
+        healthcheck = {
+          path = "/";
+          allowed_status_codes = [
+            200
+          ];
+          timeout = "1s";
+          interval = "10s";
+          filter_by_response_time = {
+            enabled = true;
+            qty_of_top_results = 3;
+          };
+          minimum_ratio = 0.2;
+          remove_no_ratio = true;
+          text_not_present = "YouTube is currently trying to block Invidious instances";
+        };
+      };
+      description = ''
+        Configuration for invidious-router.
+        Check https://gitlab.com/gaincoder/invidious-router#configuration
+        for configuration options.
+      '';
+    };
+    package = lib.mkOption {
+      type = lib.types.package;
+      default = pkgs.invidious-router;
+      defaultText = lib.literalExpression "pkgs.invidious-router";
+      description = ''
+        The invidious-router package to use.
+      '';
+    };
+    nginx = {
+      enable = lib.mkEnableOption ''
+        Automatic nginx proxy configuration
+      '';
+      domain = lib.mkOption {
+        type = lib.types.str;
+        example = "invidious-router.example.com";
+        description = ''
+          The domain on which invidious-router should be served.
+        '';
+      };
+      extraDomains = lib.mkOption {
+        type = lib.types.listOf lib.types.str;
+        default = [];
+        description = ''
+          Additional domains to serve invidious-router on.
+        '';
+      };
+    };
+  };
+  config = lib.mkIf cfg.enable {
+    systemd.services.invidious-router = {
+      wantedBy = ["multi-user.target"];
+      serviceConfig = {
+        Restart = "on-failure";
+        ExecStart = "${lib.getExe cfg.package} --configfile ${configFile}";
+        DynamicUser = "yes";
+      };
+    };
+
+    services.nginx.virtualHosts = lib.mkIf cfg.nginx.enable {
+      ${cfg.nginx.domain} = {
+        locations."/" = {
+          recommendedProxySettings = true;
+          proxyPass = "http://${cfg.address}:${toString cfg.port}";
+        };
+        enableACME = true;
+        forceSSL = true;
+        serverAliases = cfg.nginx.extraDomains;
+      };
+    };
+  };
+}
diff --git a/nixpkgs/nixos/modules/services/misc/irkerd.nix b/nixpkgs/nixos/modules/services/misc/irkerd.nix
index d080cc0a7358..993d77ba424c 100644
--- a/nixpkgs/nixos/modules/services/misc/irkerd.nix
+++ b/nixpkgs/nixos/modules/services/misc/irkerd.nix
@@ -9,13 +9,13 @@ in
 {
   options.services.irkerd = {
     enable = mkOption {
-      description = lib.mdDoc "Whether to enable irker, an IRC notification daemon.";
+      description = "Whether to enable irker, an IRC notification daemon.";
       default = false;
       type = types.bool;
     };
 
     openPorts = mkOption {
-      description = lib.mdDoc "Open ports in the firewall for irkerd";
+      description = "Open ports in the firewall for irkerd";
       default = false;
       type = types.bool;
     };
@@ -24,7 +24,7 @@ in
       default = "localhost";
       example = "0.0.0.0";
       type = types.str;
-      description = lib.mdDoc ''
+      description = ''
         Specifies the bind address on which the irker daemon listens.
         The default is localhost.
 
@@ -36,7 +36,7 @@ in
     nick = mkOption {
       default = "irker";
       type = types.str;
-      description = lib.mdDoc "Nick to use for irker";
+      description = "Nick to use for irker";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/misc/jackett.nix b/nixpkgs/nixos/modules/services/misc/jackett.nix
index c0bb0a575f01..8b5011ce0d81 100644
--- a/nixpkgs/nixos/modules/services/misc/jackett.nix
+++ b/nixpkgs/nixos/modules/services/misc/jackett.nix
@@ -9,30 +9,30 @@ in
 {
   options = {
     services.jackett = {
-      enable = mkEnableOption (lib.mdDoc "Jackett");
+      enable = mkEnableOption "Jackett, API support for your favorite torrent trackers";
 
       dataDir = mkOption {
         type = types.str;
         default = "/var/lib/jackett/.config/Jackett";
-        description = lib.mdDoc "The directory where Jackett stores its data files.";
+        description = "The directory where Jackett stores its data files.";
       };
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Open ports in the firewall for the Jackett web interface.";
+        description = "Open ports in the firewall for the Jackett web interface.";
       };
 
       user = mkOption {
         type = types.str;
         default = "jackett";
-        description = lib.mdDoc "User account under which Jackett runs.";
+        description = "User account under which Jackett runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "jackett";
-        description = lib.mdDoc "Group under which Jackett runs.";
+        description = "Group under which Jackett runs.";
       };
 
       package = mkPackageOption pkgs "jackett" { };
diff --git a/nixpkgs/nixos/modules/services/misc/jellyseerr.nix b/nixpkgs/nixos/modules/services/misc/jellyseerr.nix
index 31e0c5beb673..7599a1af3384 100644
--- a/nixpkgs/nixos/modules/services/misc/jellyseerr.nix
+++ b/nixpkgs/nixos/modules/services/misc/jellyseerr.nix
@@ -8,18 +8,18 @@ in
   meta.maintainers = [ maintainers.camillemndn ];
 
   options.services.jellyseerr = {
-    enable = mkEnableOption (mdDoc ''Jellyseerr, a requests manager for Jellyfin'');
+    enable = mkEnableOption ''Jellyseerr, a requests manager for Jellyfin'';
 
     openFirewall = mkOption {
       type = types.bool;
       default = false;
-      description = mdDoc ''Open port in the firewall for the Jellyseerr web interface.'';
+      description = ''Open port in the firewall for the Jellyseerr web interface.'';
     };
 
     port = mkOption {
       type = types.port;
       default = 5055;
-      description = mdDoc ''The port which the Jellyseerr web UI should listen to.'';
+      description = ''The port which the Jellyseerr web UI should listen to.'';
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/misc/klipper.nix b/nixpkgs/nixos/modules/services/misc/klipper.nix
index a0eb409599b5..5e20b32bc8fd 100644
--- a/nixpkgs/nixos/modules/services/misc/klipper.nix
+++ b/nixpkgs/nixos/modules/services/misc/klipper.nix
@@ -14,7 +14,7 @@ in
   ##### interface
   options = {
     services.klipper = {
-      enable = mkEnableOption (lib.mdDoc "Klipper, the 3D printer firmware");
+      enable = mkEnableOption "Klipper, the 3D printer firmware";
 
       package = mkPackageOption pkgs "klipper" { };
 
@@ -22,7 +22,7 @@ in
         type = types.nullOr types.path;
         default = null;
         example = "/var/lib/klipper/klipper.log";
-        description = lib.mdDoc ''
+        description = ''
           Path of the file Klipper should log to.
           If `null`, it logs to stdout, which is not recommended by upstream.
         '';
@@ -31,20 +31,20 @@ in
       inputTTY = mkOption {
         type = types.path;
         default = "/run/klipper/tty";
-        description = lib.mdDoc "Path of the virtual printer symlink to create.";
+        description = "Path of the virtual printer symlink to create.";
       };
 
       apiSocket = mkOption {
         type = types.nullOr types.path;
         default = "/run/klipper/api";
-        description = lib.mdDoc "Path of the API socket to create.";
+        description = "Path of the API socket to create.";
       };
 
       mutableConfig = mkOption {
         type = types.bool;
         default = false;
         example = true;
-        description = lib.mdDoc ''
+        description = ''
           Whether to copy the config to a mutable directory instead of using the one directly from the nix store.
           This will only copy the config if the file at `services.klipper.mutableConfigPath` doesn't exist.
         '';
@@ -53,13 +53,13 @@ in
       mutableConfigFolder = mkOption {
         type = types.path;
         default = "/var/lib/klipper";
-        description = lib.mdDoc "Path to mutable Klipper config file.";
+        description = "Path to mutable Klipper config file.";
       };
 
       configFile = mkOption {
         type = types.nullOr types.path;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           Path to default Klipper config.
         '';
       };
@@ -67,13 +67,13 @@ in
       octoprintIntegration = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Allows Octoprint to control Klipper.";
+        description = "Allows Octoprint to control Klipper.";
       };
 
       user = mkOption {
         type = types.nullOr types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           User account under which Klipper runs.
 
           If null is specified (default), a temporary user will be created by systemd.
@@ -83,7 +83,7 @@ in
       group = mkOption {
         type = types.nullOr types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           Group account under which Klipper runs.
 
           If null is specified (default), a temporary user will be created by systemd.
@@ -93,32 +93,32 @@ in
       settings = mkOption {
         type = types.nullOr format.type;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           Configuration for Klipper. See the [documentation](https://www.klipper3d.org/Overview.html#configuration-and-tuning-guides)
           for supported values.
         '';
       };
 
       firmwares = mkOption {
-        description = lib.mdDoc "Firmwares klipper should manage";
+        description = "Firmwares klipper should manage";
         default = { };
         type = with types; attrsOf
           (submodule {
             options = {
-              enable = mkEnableOption (lib.mdDoc ''
+              enable = mkEnableOption ''
                 building of firmware for manual flashing
-              '');
-              enableKlipperFlash = mkEnableOption (lib.mdDoc ''
+              '';
+              enableKlipperFlash = mkEnableOption ''
                 flashings scripts for firmware. This will add `klipper-flash-$mcu` scripts to your environment which can be called to flash the firmware.
                 Please check the configs at [klipper](https://github.com/Klipper3d/klipper/tree/master/config) whether your board supports flashing via `make flash`
-              '');
+              '';
               serial = mkOption {
                 type = types.nullOr path;
-                description = lib.mdDoc "Path to serial port this printer is connected to. Leave `null` to derive it from `service.klipper.settings`.";
+                description = "Path to serial port this printer is connected to. Leave `null` to derive it from `service.klipper.settings`.";
               };
               configFile = mkOption {
                 type = path;
-                description = lib.mdDoc "Path to firmware config which is generated using `klipper-genconf`";
+                description = "Path to firmware config which is generated using `klipper-genconf`";
               };
             };
           });
diff --git a/nixpkgs/nixos/modules/services/misc/languagetool.nix b/nixpkgs/nixos/modules/services/misc/languagetool.nix
index 9adf792373b5..ba563dace473 100644
--- a/nixpkgs/nixos/modules/services/misc/languagetool.nix
+++ b/nixpkgs/nixos/modules/services/misc/languagetool.nix
@@ -7,24 +7,24 @@ let
   settingsFormat = pkgs.formats.javaProperties {};
 in {
   options.services.languagetool = {
-    enable = mkEnableOption (mdDoc "the LanguageTool server");
+    enable = mkEnableOption "the LanguageTool server, a multilingual spelling, style, and grammar checker that helps correct or paraphrase texts";
 
     port = mkOption {
       type = types.port;
       default = 8081;
       example = 8081;
-      description = mdDoc ''
+      description = ''
         Port on which LanguageTool listens.
       '';
     };
 
-    public = mkEnableOption (mdDoc "access from anywhere (rather than just localhost)");
+    public = mkEnableOption "access from anywhere (rather than just localhost)";
 
     allowOrigin = mkOption {
       type = types.nullOr types.str;
       default = null;
       example = "https://my-website.org";
-      description = mdDoc ''
+      description = ''
         Set the Access-Control-Allow-Origin header in the HTTP response,
         used for direct (non-proxy) JavaScript-based access from browsers.
         `null` to allow access from all sites.
@@ -39,11 +39,11 @@ in {
           type = types.ints.unsigned;
           default = 1000;
           apply = toString;
-          description = mdDoc "Number of sentences cached.";
+          description = "Number of sentences cached.";
         };
       };
       default = {};
-      description = mdDoc ''
+      description = ''
         Configuration file options for LanguageTool, see
         'languagetool-http-server --help'
         for supported settings.
diff --git a/nixpkgs/nixos/modules/services/misc/leaps.nix b/nixpkgs/nixos/modules/services/misc/leaps.nix
index 5522223ecc97..c6f5a1252332 100644
--- a/nixpkgs/nixos/modules/services/misc/leaps.nix
+++ b/nixpkgs/nixos/modules/services/misc/leaps.nix
@@ -9,22 +9,22 @@ in
 {
   options = {
     services.leaps = {
-      enable = mkEnableOption (lib.mdDoc "leaps");
+      enable = mkEnableOption "leaps, a pair programming service";
       port = mkOption {
         type = types.port;
         default = 8080;
-        description = lib.mdDoc "A port where leaps listens for incoming http requests";
+        description = "A port where leaps listens for incoming http requests";
       };
       address = mkOption {
         default = "";
         type = types.str;
         example = "127.0.0.1";
-        description = lib.mdDoc "Hostname or IP-address to listen to. By default it will listen on all interfaces.";
+        description = "Hostname or IP-address to listen to. By default it will listen on all interfaces.";
       };
       path = mkOption {
         default = "/";
         type = types.path;
-        description = lib.mdDoc "Subdirectory used for reverse proxy setups";
+        description = "Subdirectory used for reverse proxy setups";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/libreddit.nix b/nixpkgs/nixos/modules/services/misc/libreddit.nix
index 02d71c198e78..c1f6b276ad9f 100644
--- a/nixpkgs/nixos/modules/services/misc/libreddit.nix
+++ b/nixpkgs/nixos/modules/services/misc/libreddit.nix
@@ -13,7 +13,7 @@ in
 {
   options = {
     services.libreddit = {
-      enable = mkEnableOption (lib.mdDoc "Private front-end for Reddit");
+      enable = mkEnableOption "Private front-end for Reddit";
 
       package = mkPackageOption pkgs "libreddit" { };
 
@@ -21,20 +21,20 @@ in
         default = "0.0.0.0";
         example = "127.0.0.1";
         type =  types.str;
-        description = lib.mdDoc "The address to listen on";
+        description = "The address to listen on";
       };
 
       port = mkOption {
         default = 8080;
         example = 8000;
         type = types.port;
-        description = lib.mdDoc "The port to listen on";
+        description = "The port to listen on";
       };
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Open ports in the firewall for the libreddit web interface";
+        description = "Open ports in the firewall for the libreddit web interface";
       };
 
     };
@@ -47,7 +47,7 @@ in
         after = [ "network.target" ];
         serviceConfig = {
           DynamicUser = true;
-          ExecStart = "${cfg.package}/bin/libreddit ${args}";
+          ExecStart = "${lib.getExe cfg.package} ${args}";
           AmbientCapabilities = lib.mkIf (cfg.port < 1024) [ "CAP_NET_BIND_SERVICE" ];
           Restart = "on-failure";
           RestartSec = "2s";
diff --git a/nixpkgs/nixos/modules/services/misc/lidarr.nix b/nixpkgs/nixos/modules/services/misc/lidarr.nix
index 8ceb567e8801..5f7b5c293a25 100644
--- a/nixpkgs/nixos/modules/services/misc/lidarr.nix
+++ b/nixpkgs/nixos/modules/services/misc/lidarr.nix
@@ -8,12 +8,12 @@ in
 {
   options = {
     services.lidarr = {
-      enable = mkEnableOption (lib.mdDoc "Lidarr");
+      enable = mkEnableOption "Lidarr, a Usenet/BitTorrent music downloader";
 
       dataDir = mkOption {
         type = types.str;
         default = "/var/lib/lidarr/.config/Lidarr";
-        description = lib.mdDoc "The directory where Lidarr stores its data files.";
+        description = "The directory where Lidarr stores its data files.";
       };
 
       package = mkPackageOption pkgs "lidarr" { };
@@ -21,7 +21,7 @@ in
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Open ports in the firewall for Lidarr
         '';
       };
@@ -29,7 +29,7 @@ in
       user = mkOption {
         type = types.str;
         default = "lidarr";
-        description = lib.mdDoc ''
+        description = ''
           User account under which Lidarr runs.
         '';
       };
@@ -37,7 +37,7 @@ in
       group = mkOption {
         type = types.str;
         default = "lidarr";
-        description = lib.mdDoc ''
+        description = ''
           Group under which Lidarr runs.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/lifecycled.nix b/nixpkgs/nixos/modules/services/misc/lifecycled.nix
index fb5cabb4f038..8b80af392492 100644
--- a/nixpkgs/nixos/modules/services/misc/lifecycled.nix
+++ b/nixpkgs/nixos/modules/services/misc/lifecycled.nix
@@ -25,15 +25,15 @@ in
 
   options = {
     services.lifecycled = {
-      enable = mkEnableOption (lib.mdDoc "lifecycled");
+      enable = mkEnableOption "lifecycled, a daemon for responding to AWS AutoScaling Lifecycle Hooks";
 
       queueCleaner = {
-        enable = mkEnableOption (lib.mdDoc "lifecycled-queue-cleaner");
+        enable = mkEnableOption "lifecycled-queue-cleaner";
 
         frequency = mkOption {
           type = types.str;
           default = "hourly";
-          description = lib.mdDoc ''
+          description = ''
             How often to trigger the queue cleaner.
 
             NOTE: This string should be a valid value for a systemd
@@ -46,7 +46,7 @@ in
         parallel = mkOption {
           type = types.ints.unsigned;
           default = 20;
-          description = lib.mdDoc ''
+          description = ''
             The number of parallel deletes to run.
           '';
         };
@@ -55,7 +55,7 @@ in
       instanceId = mkOption {
         type = types.nullOr types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The instance ID to listen for events for.
         '';
       };
@@ -63,7 +63,7 @@ in
       snsTopic = mkOption {
         type = types.nullOr types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The SNS topic that receives events.
         '';
       };
@@ -71,14 +71,14 @@ in
       noSpot = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Disable the spot termination listener.
         '';
       };
 
       handler = mkOption {
         type = types.path;
-        description = lib.mdDoc ''
+        description = ''
           The script to invoke to handle events.
         '';
       };
@@ -86,7 +86,7 @@ in
       json = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Enable JSON logging.
         '';
       };
@@ -94,7 +94,7 @@ in
       cloudwatchGroup = mkOption {
         type = types.nullOr types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           Write logs to a specific Cloudwatch Logs group.
         '';
       };
@@ -102,7 +102,7 @@ in
       cloudwatchStream = mkOption {
         type = types.nullOr types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           Write logs to a specific Cloudwatch Logs stream. Defaults to the instance ID.
         '';
       };
@@ -110,7 +110,7 @@ in
       debug = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Enable debugging information.
         '';
       };
@@ -120,7 +120,7 @@ in
       awsRegion = mkOption {
         type = types.nullOr types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The region used for accessing AWS services.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/llama-cpp.nix b/nixpkgs/nixos/modules/services/misc/llama-cpp.nix
index 305d4538e89a..c73cff027e22 100644
--- a/nixpkgs/nixos/modules/services/misc/llama-cpp.nix
+++ b/nixpkgs/nixos/modules/services/misc/llama-cpp.nix
@@ -20,7 +20,7 @@ in {
       extraFlags = lib.mkOption {
         type = lib.types.listOf lib.types.str;
         description = "Extra flags passed to llama-cpp-server.";
-        example = ["-c" "4096" "-ngl" "32" "--numa"];
+        example = ["-c" "4096" "-ngl" "32" "--numa" "numactl"];
         default = [];
       };
 
diff --git a/nixpkgs/nixos/modules/services/misc/logkeys.nix b/nixpkgs/nixos/modules/services/misc/logkeys.nix
index 75d073a0c94b..0fb4fa6cf8de 100644
--- a/nixpkgs/nixos/modules/services/misc/logkeys.nix
+++ b/nixpkgs/nixos/modules/services/misc/logkeys.nix
@@ -6,10 +6,10 @@ let
   cfg = config.services.logkeys;
 in {
   options.services.logkeys = {
-    enable = mkEnableOption (lib.mdDoc "logkeys service");
+    enable = mkEnableOption "logkeys, a keylogger service";
 
     device = mkOption {
-      description = lib.mdDoc "Use the given device as keyboard input event device instead of /dev/input/eventX default.";
+      description = "Use the given device as keyboard input event device instead of /dev/input/eventX default.";
       default = null;
       type = types.nullOr types.str;
       example = "/dev/input/event15";
diff --git a/nixpkgs/nixos/modules/services/misc/mame.nix b/nixpkgs/nixos/modules/services/misc/mame.nix
index 6e9d2fd26cff..6c7f08d48be1 100644
--- a/nixpkgs/nixos/modules/services/misc/mame.nix
+++ b/nixpkgs/nixos/modules/services/misc/mame.nix
@@ -12,19 +12,19 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to setup TUN/TAP Ethernet interface for MAME emulator.
         '';
       };
       user = mkOption {
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           User from which you run MAME binary.
         '';
       };
       hostAddr = mkOption {
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           IP address of the host system. Usually an address of the main network
           adapter or the adapter through which you get an internet connection.
         '';
@@ -32,7 +32,7 @@ in
       };
       emuAddr = mkOption {
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           IP address of the guest system. The same you set inside guest OS under
           MAME. Should be on the same subnet as {option}`services.mame.hostAddr`.
         '';
diff --git a/nixpkgs/nixos/modules/services/misc/mbpfan.nix b/nixpkgs/nixos/modules/services/misc/mbpfan.nix
index ef56ea49d1a9..1d9b7ae87ca0 100644
--- a/nixpkgs/nixos/modules/services/misc/mbpfan.nix
+++ b/nixpkgs/nixos/modules/services/misc/mbpfan.nix
@@ -4,55 +4,54 @@ with lib;
 let
   cfg = config.services.mbpfan;
   verbose = optionalString cfg.verbose "v";
-  settingsFormat = pkgs.formats.ini {};
-  settingsFile = settingsFormat.generate "mbpfan.ini" cfg.settings;
+  format = pkgs.formats.ini {};
+  cfgfile = format.generate "mbpfan.ini" cfg.settings;
 
 in {
   options.services.mbpfan = {
-    enable = mkEnableOption (lib.mdDoc "mbpfan, fan controller daemon for Apple Macs and MacBooks");
-
-    package = mkPackageOption pkgs "mbpfan" { };
+    enable = mkEnableOption "mbpfan, fan controller daemon for Apple Macs and MacBooks";
+    package = mkPackageOption pkgs "mbpfan" {};
 
     verbose = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "If true, sets the log level to verbose.";
+      description = "If true, sets the log level to verbose.";
     };
 
     aggressive = mkOption {
       type = types.bool;
       default = true;
-      description = lib.mdDoc "If true, favors higher default fan speeds.";
+      description = "If true, favors higher default fan speeds.";
     };
 
     settings = mkOption {
       default = {};
-      description = lib.mdDoc "INI configuration for Mbpfan.";
+      description = "INI configuration for Mbpfan.";
       type = types.submodule {
-        freeformType = settingsFormat.type;
+        freeformType = format.type;
 
         options.general.low_temp = mkOption {
           type = types.int;
           default = (if cfg.aggressive then 55 else 63);
           defaultText = literalExpression "55";
-          description = lib.mdDoc "If temperature is below this, fans will run at minimum speed.";
+          description = "If temperature is below this, fans will run at minimum speed.";
         };
         options.general.high_temp = mkOption {
           type = types.int;
           default = (if cfg.aggressive then 58 else 66);
           defaultText = literalExpression "58";
-          description = lib.mdDoc "If temperature is above this, fan speed will gradually increase.";
+          description = "If temperature is above this, fan speed will gradually increase.";
         };
         options.general.max_temp = mkOption {
           type = types.int;
           default = (if cfg.aggressive then 78 else 86);
           defaultText = literalExpression "78";
-          description = lib.mdDoc "If temperature is above this, fans will run at maximum speed.";
+          description = "If temperature is above this, fans will run at maximum speed.";
         };
         options.general.polling_interval = mkOption {
           type = types.int;
           default = 1;
-          description = lib.mdDoc "The polling interval.";
+          description = "The polling interval.";
         };
       };
     };
@@ -70,12 +69,12 @@ in {
   config = mkIf cfg.enable {
     boot.kernelModules = [ "coretemp" "applesmc" ];
     environment.systemPackages = [ cfg.package ];
-    environment.etc."mbpfan.conf".source = settingsFile;
+    environment.etc."mbpfan.conf".source = cfgfile;
 
     systemd.services.mbpfan = {
       description = "A fan manager daemon for MacBook Pro";
       wantedBy = [ "sysinit.target" ];
-      after = [ "syslog.target" "sysinit.target" ];
+      after = [ "sysinit.target" ];
       restartTriggers = [ config.environment.etc."mbpfan.conf".source ];
 
       serviceConfig = {
diff --git a/nixpkgs/nixos/modules/services/misc/mediatomb.nix b/nixpkgs/nixos/modules/services/misc/mediatomb.nix
index 03235e9a1265..932558e25802 100644
--- a/nixpkgs/nixos/modules/services/misc/mediatomb.nix
+++ b/nixpkgs/nixos/modules/services/misc/mediatomb.nix
@@ -15,19 +15,19 @@ let
     options = {
       path = mkOption {
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           Absolute directory path to the media directory to index.
         '';
       };
       recursive = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether the indexation must take place recursively or not.";
+        description = "Whether the indexation must take place recursively or not.";
       };
       hidden-files = mkOption {
         type = types.bool;
         default = true;
-        description = lib.mdDoc "Whether to index the hidden files or not.";
+        description = "Whether to index the hidden files or not.";
       };
     };
   };
@@ -202,7 +202,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable the Gerbera/Mediatomb DLNA server.
         '';
       };
@@ -210,7 +210,7 @@ in {
       serverName = mkOption {
         type = types.str;
         default = "Gerbera (Mediatomb)";
-        description = lib.mdDoc ''
+        description = ''
           How to identify the server on the network.
         '';
       };
@@ -220,7 +220,7 @@ in {
       ps3Support = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable ps3 specific tweaks.
           WARNING: incompatible with DSM 320 support.
         '';
@@ -229,7 +229,7 @@ in {
       dsmSupport = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable D-Link DSM 320 specific tweaks.
           WARNING: incompatible with ps3 support.
         '';
@@ -238,7 +238,7 @@ in {
       tg100Support = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable Telegent TG100 specific tweaks.
         '';
       };
@@ -246,7 +246,7 @@ in {
       transcoding = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable transcoding.
         '';
       };
@@ -255,7 +255,7 @@ in {
         type = types.path;
         default = "/var/lib/${name}";
         defaultText = literalExpression ''"/var/lib/''${config.${opt.package}.pname}"'';
-        description = lib.mdDoc ''
+        description = ''
           The directory where Gerbera/Mediatomb stores its state, data, etc.
         '';
       };
@@ -263,7 +263,7 @@ in {
       pcDirectoryHide = mkOption {
         type = types.bool;
         default = true;
-        description = lib.mdDoc ''
+        description = ''
           Whether to list the top-level directory or not (from upnp client standpoint).
         '';
       };
@@ -271,19 +271,19 @@ in {
       user = mkOption {
         type = types.str;
         default = "mediatomb";
-        description = lib.mdDoc "User account under which the service runs.";
+        description = "User account under which the service runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "mediatomb";
-        description = lib.mdDoc "Group account under which the service runs.";
+        description = "Group account under which the service runs.";
       };
 
       port = mkOption {
         type = types.port;
         default = 49152;
-        description = lib.mdDoc ''
+        description = ''
           The network port to listen on.
         '';
       };
@@ -291,7 +291,7 @@ in {
       interface = mkOption {
         type = types.str;
         default = "";
-        description = lib.mdDoc ''
+        description = ''
           A specific interface to bind to.
         '';
       };
@@ -299,7 +299,7 @@ in {
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           If false (the default), this is up to the user to declare the firewall rules.
           If true, this opens port 1900 (tcp and udp) and the port specified by
           {option}`sercvices.mediatomb.port`.
@@ -313,7 +313,7 @@ in {
       uuid = mkOption {
         type = types.str;
         default = "fdfc8a4e-a3ad-4c1d-b43d-a2eedb03a687";
-        description = lib.mdDoc ''
+        description = ''
           A unique (on your network) to identify the server by.
         '';
       };
@@ -321,7 +321,7 @@ in {
       mediaDirectories = mkOption {
         type = with types; listOf (submodule mediaDirectory);
         default = [];
-        description = lib.mdDoc ''
+        description = ''
           Declare media directories to index.
         '';
         example = [
@@ -333,7 +333,7 @@ in {
       customCfg = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Allow the service to create and use its own config file inside the `dataDir` as
           configured by {option}`services.mediatomb.dataDir`.
           Deactivated by default, the service then runs with the configuration generated from this module.
diff --git a/nixpkgs/nixos/modules/services/misc/metabase.nix b/nixpkgs/nixos/modules/services/misc/metabase.nix
index 5fc18e27eaae..eebe582548a5 100644
--- a/nixpkgs/nixos/modules/services/misc/metabase.nix
+++ b/nixpkgs/nixos/modules/services/misc/metabase.nix
@@ -13,13 +13,13 @@ in {
   options = {
 
     services.metabase = {
-      enable = mkEnableOption (lib.mdDoc "Metabase service");
+      enable = mkEnableOption "Metabase service";
 
       listen = {
         ip = mkOption {
           type = types.str;
           default = "0.0.0.0";
-          description = lib.mdDoc ''
+          description = ''
             IP address that Metabase should listen on.
           '';
         };
@@ -27,7 +27,7 @@ in {
         port = mkOption {
           type = types.port;
           default = 3000;
-          description = lib.mdDoc ''
+          description = ''
             Listen port for Metabase.
           '';
         };
@@ -37,7 +37,7 @@ in {
         enable = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc ''
+          description = ''
             Whether to enable SSL (https) support.
           '';
         };
@@ -45,7 +45,7 @@ in {
         port = mkOption {
           type = types.port;
           default = 8443;
-          description = lib.mdDoc ''
+          description = ''
             Listen port over SSL (https) for Metabase.
           '';
         };
@@ -54,7 +54,7 @@ in {
           type = types.nullOr types.path;
           default = "${dataDir}/metabase.jks";
           example = "/etc/secrets/keystore.jks";
-          description = lib.mdDoc ''
+          description = ''
             [Java KeyStore](https://www.digitalocean.com/community/tutorials/java-keytool-essentials-working-with-java-keystores) file containing the certificates.
           '';
         };
@@ -64,7 +64,7 @@ in {
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Open ports in the firewall for Metabase.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/moonraker.nix b/nixpkgs/nixos/modules/services/misc/moonraker.nix
index f043cc83bf05..1461f1048b03 100644
--- a/nixpkgs/nixos/modules/services/misc/moonraker.nix
+++ b/nixpkgs/nixos/modules/services/misc/moonraker.nix
@@ -16,7 +16,7 @@ let
 in {
   options = {
     services.moonraker = {
-      enable = mkEnableOption (lib.mdDoc "Moonraker, an API web server for Klipper");
+      enable = mkEnableOption "Moonraker, an API web server for Klipper";
 
       package = mkPackageOption pkgs "moonraker" {
         nullable = true;
@@ -27,19 +27,19 @@ in {
         type = types.path;
         default = config.services.klipper.apiSocket;
         defaultText = literalExpression "config.services.klipper.apiSocket";
-        description = lib.mdDoc "Path to Klipper's API socket.";
+        description = "Path to Klipper's API socket.";
       };
 
       stateDir = mkOption {
         type = types.path;
         default = "/var/lib/moonraker";
-        description = lib.mdDoc "The directory containing the Moonraker databases.";
+        description = "The directory containing the Moonraker databases.";
       };
 
       configDir = mkOption {
         type = types.nullOr types.path;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           Deprecated directory containing client-writable configuration files.
 
           Clients will be able to edit files in this directory via the API. This directory must be writable.
@@ -49,26 +49,26 @@ in {
       user = mkOption {
         type = types.str;
         default = "moonraker";
-        description = lib.mdDoc "User account under which Moonraker runs.";
+        description = "User account under which Moonraker runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "moonraker";
-        description = lib.mdDoc "Group account under which Moonraker runs.";
+        description = "Group account under which Moonraker runs.";
       };
 
       address = mkOption {
         type = types.str;
         default = "127.0.0.1";
         example = "0.0.0.0";
-        description = lib.mdDoc "The IP or host to listen on.";
+        description = "The IP or host to listen on.";
       };
 
       port = mkOption {
         type = types.ints.unsigned;
         default = 7125;
-        description = lib.mdDoc "The port to listen on.";
+        description = "The port to listen on.";
       };
 
       settings = mkOption {
@@ -80,7 +80,7 @@ in {
             cors_domains = [ "https://app.fluidd.xyz" "https://my.mainsail.xyz" ];
           };
         };
-        description = lib.mdDoc ''
+        description = ''
           Configuration for Moonraker. See the [documentation](https://moonraker.readthedocs.io/en/latest/configuration/)
           for supported values.
         '';
@@ -89,7 +89,7 @@ in {
       allowSystemControl = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to allow Moonraker to perform system-level operations.
 
           Moonraker exposes APIs to perform system-level operations, such as
diff --git a/nixpkgs/nixos/modules/services/misc/mqtt2influxdb.nix b/nixpkgs/nixos/modules/services/misc/mqtt2influxdb.nix
index 621f51a4e7fd..a2d6a2b34a23 100644
--- a/nixpkgs/nixos/modules/services/misc/mqtt2influxdb.nix
+++ b/nixpkgs/nixos/modules/services/misc/mqtt2influxdb.nix
@@ -21,11 +21,11 @@ let
     options = {
       measurement = mkOption {
         type = types.str;
-        description = mdDoc "Name of the measurement";
+        description = "Name of the measurement";
       };
       topic = mkOption {
         type = types.str;
-        description = mdDoc "MQTT topic to subscribe to.";
+        description = "MQTT topic to subscribe to.";
       };
       fields = mkOption {
         type = types.submodule {
@@ -33,21 +33,21 @@ let
             value = mkOption {
               type = types.str;
               default = "$.payload";
-              description = mdDoc "Value to be picked up";
+              description = "Value to be picked up";
             };
             type = mkOption {
               type = with types; nullOr str;
               default = null;
-              description = mdDoc "Type to be picked up";
+              description = "Type to be picked up";
             };
           };
         };
-        description = mdDoc "Field selector.";
+        description = "Field selector.";
       };
       tags = mkOption {
         type = with types; attrsOf str;
         default = {};
-        description = mdDoc "Tags applied";
+        description = "Tags applied";
       };
     };
   };
@@ -124,12 +124,12 @@ let
 in {
   options = {
     services.mqtt2influxdb = {
-      enable = mkEnableOption (mdDoc "BigClown MQTT to InfluxDB bridge.");
+      enable = mkEnableOption "BigClown MQTT to InfluxDB bridge.";
       environmentFiles = mkOption {
         type = types.listOf types.path;
         default = [];
         example = [ "/run/keys/mqtt2influxdb.env" ];
-        description = mdDoc ''
+        description = ''
           File to load as environment file. Environment variables from this file
           will be interpolated into the config file using envsubst with this
           syntax: `$ENVIRONMENT` or `''${VARIABLE}`.
@@ -140,22 +140,22 @@ in {
         host = mkOption {
           type = types.str;
           default = "127.0.0.1";
-          description = mdDoc "Host where MQTT server is running.";
+          description = "Host where MQTT server is running.";
         };
         port = mkOption {
           type = types.port;
           default = 1883;
-          description = mdDoc "MQTT server port.";
+          description = "MQTT server port.";
         };
         username = mkOption {
           type = with types; nullOr str;
           default = null;
-          description = mdDoc "Username used to connect to the MQTT server.";
+          description = "Username used to connect to the MQTT server.";
         };
         password = mkOption {
           type = with types; nullOr str;
           default = null;
-          description = mdDoc ''
+          description = ''
             MQTT password.
 
             It is highly suggested to use here replacement through
@@ -166,43 +166,43 @@ in {
         cafile = mkOption {
           type = with types; nullOr path;
           default = null;
-          description = mdDoc "Certification Authority file for MQTT";
+          description = "Certification Authority file for MQTT";
         };
         certfile = mkOption {
           type = with types; nullOr path;
           default = null;
-          description = mdDoc "Certificate file for MQTT";
+          description = "Certificate file for MQTT";
         };
         keyfile = mkOption {
           type = with types; nullOr path;
           default = null;
-          description = mdDoc "Key file for MQTT";
+          description = "Key file for MQTT";
         };
       };
       influxdb = {
         host = mkOption {
           type = types.str;
           default = "127.0.0.1";
-          description = mdDoc "Host where InfluxDB server is running.";
+          description = "Host where InfluxDB server is running.";
         };
         port = mkOption {
           type = types.port;
           default = 8086;
-          description = mdDoc "InfluxDB server port";
+          description = "InfluxDB server port";
         };
         database = mkOption {
           type = types.str;
-          description = mdDoc "Name of the InfluxDB database.";
+          description = "Name of the InfluxDB database.";
         };
         username = mkOption {
           type = with types; nullOr str;
           default = null;
-          description = mdDoc "Username for InfluxDB login.";
+          description = "Username for InfluxDB login.";
         };
         password = mkOption {
           type = with types; nullOr str;
           default = null;
-          description = mdDoc ''
+          description = ''
             Password for InfluxDB login.
 
             It is highly suggested to use here replacement through
@@ -213,18 +213,18 @@ in {
         ssl = mkOption {
           type = types.bool;
           default = false;
-          description = mdDoc "Use SSL to connect to the InfluxDB server.";
+          description = "Use SSL to connect to the InfluxDB server.";
         };
         verify_ssl = mkOption {
           type = types.bool;
           default = true;
-          description = mdDoc "Verify SSL certificate when connecting to the InfluxDB server.";
+          description = "Verify SSL certificate when connecting to the InfluxDB server.";
         };
       };
       points = mkOption {
         type = types.listOf pointType;
         default = defaultPoints;
-        description = mdDoc "Points to bridge from MQTT to InfluxDB.";
+        description = "Points to bridge from MQTT to InfluxDB.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/n8n.nix b/nixpkgs/nixos/modules/services/misc/n8n.nix
index 2af37fba910a..231470b9937a 100644
--- a/nixpkgs/nixos/modules/services/misc/n8n.nix
+++ b/nixpkgs/nixos/modules/services/misc/n8n.nix
@@ -9,18 +9,18 @@ let
 in
 {
   options.services.n8n = {
-    enable = mkEnableOption (lib.mdDoc "n8n server");
+    enable = mkEnableOption "n8n server";
 
     openFirewall = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Open ports in the firewall for the n8n web interface.";
+      description = "Open ports in the firewall for the n8n web interface.";
     };
 
     settings = mkOption {
       type = format.type;
       default = {};
-      description = lib.mdDoc ''
+      description = ''
         Configuration for n8n, see <https://docs.n8n.io/hosting/environment-variables/configuration-methods/>
         for supported values.
       '';
@@ -29,7 +29,7 @@ in
     webhookUrl = mkOption {
       type = types.str;
       default = "";
-      description = lib.mdDoc ''
+      description = ''
         WEBHOOK_URL for n8n, in case we're running behind a reverse proxy.
         This cannot be set through configuration and must reside in an environment variable.
       '';
diff --git a/nixpkgs/nixos/modules/services/misc/nitter.nix b/nixpkgs/nixos/modules/services/misc/nitter.nix
index d2cf7c0de2b7..f8be2aed70c9 100644
--- a/nixpkgs/nixos/modules/services/misc/nitter.nix
+++ b/nixpkgs/nixos/modules/services/misc/nitter.nix
@@ -52,7 +52,7 @@ in
 
   options = {
     services.nitter = {
-      enable = mkEnableOption (lib.mdDoc "Nitter");
+      enable = mkEnableOption "Nitter, an alternative Twitter front-end";
 
       package = mkPackageOption pkgs "nitter" { };
 
@@ -61,46 +61,46 @@ in
           type =  types.str;
           default = "0.0.0.0";
           example = "127.0.0.1";
-          description = lib.mdDoc "The address to listen on.";
+          description = "The address to listen on.";
         };
 
         port = mkOption {
           type = types.port;
           default = 8080;
           example = 8000;
-          description = lib.mdDoc "The port to listen on.";
+          description = "The port to listen on.";
         };
 
         https = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Set secure attribute on cookies. Keep it disabled to enable cookies when not using HTTPS.";
+          description = "Set secure attribute on cookies. Keep it disabled to enable cookies when not using HTTPS.";
         };
 
         httpMaxConnections = mkOption {
           type = types.int;
           default = 100;
-          description = lib.mdDoc "Maximum number of HTTP connections.";
+          description = "Maximum number of HTTP connections.";
         };
 
         staticDir = mkOption {
           type = types.path;
           default = "${cfg.package}/share/nitter/public";
           defaultText = literalExpression ''"''${config.services.nitter.package}/share/nitter/public"'';
-          description = lib.mdDoc "Path to the static files directory.";
+          description = "Path to the static files directory.";
         };
 
         title = mkOption {
           type = types.str;
           default = "nitter";
-          description = lib.mdDoc "Title of the instance.";
+          description = "Title of the instance.";
         };
 
         hostname = mkOption {
           type = types.str;
           default = "localhost";
           example = "nitter.net";
-          description = lib.mdDoc "Hostname of the instance.";
+          description = "Hostname of the instance.";
         };
       };
 
@@ -108,37 +108,37 @@ in
         listMinutes = mkOption {
           type = types.int;
           default = 240;
-          description = lib.mdDoc "How long to cache list info (not the tweets, so keep it high).";
+          description = "How long to cache list info (not the tweets, so keep it high).";
         };
 
         rssMinutes = mkOption {
           type = types.int;
           default = 10;
-          description = lib.mdDoc "How long to cache RSS queries.";
+          description = "How long to cache RSS queries.";
         };
 
         redisHost = mkOption {
           type = types.str;
           default = "localhost";
-          description = lib.mdDoc "Redis host.";
+          description = "Redis host.";
         };
 
         redisPort = mkOption {
           type = types.port;
           default = 6379;
-          description = lib.mdDoc "Redis port.";
+          description = "Redis port.";
         };
 
         redisConnections = mkOption {
           type = types.int;
           default = 20;
-          description = lib.mdDoc "Redis connection pool size.";
+          description = "Redis connection pool size.";
         };
 
         redisMaxConnections = mkOption {
           type = types.int;
           default = 30;
-          description = lib.mdDoc ''
+          description = ''
             Maximum number of connections to Redis.
 
             New connections are opened when none are available, but if the
@@ -152,29 +152,29 @@ in
         base64Media = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Use base64 encoding for proxied media URLs.";
+          description = "Use base64 encoding for proxied media URLs.";
         };
 
-        enableRSS = mkEnableOption (lib.mdDoc "RSS feeds") // { default = true; };
+        enableRSS = mkEnableOption "RSS feeds" // { default = true; };
 
-        enableDebug = mkEnableOption (lib.mdDoc "request logs and debug endpoints");
+        enableDebug = mkEnableOption "request logs and debug endpoints";
 
         proxy = mkOption {
           type = types.str;
           default = "";
-          description = lib.mdDoc "URL to a HTTP/HTTPS proxy.";
+          description = "URL to a HTTP/HTTPS proxy.";
         };
 
         proxyAuth = mkOption {
           type = types.str;
           default = "";
-          description = lib.mdDoc "Credentials for proxy.";
+          description = "Credentials for proxy.";
         };
 
         tokenCount = mkOption {
           type = types.int;
           default = 10;
-          description = lib.mdDoc ''
+          description = ''
             Minimum amount of usable tokens.
 
             Tokens are used to authorize API requests, but they expire after
@@ -191,112 +191,112 @@ in
           type = types.str;
           default = "";
           example = "nitter.net";
-          description = lib.mdDoc "Replace Twitter links with links to this instance (blank to disable).";
+          description = "Replace Twitter links with links to this instance (blank to disable).";
         };
 
         replaceYouTube = mkOption {
           type = types.str;
           default = "";
           example = "piped.kavin.rocks";
-          description = lib.mdDoc "Replace YouTube links with links to this instance (blank to disable).";
+          description = "Replace YouTube links with links to this instance (blank to disable).";
         };
 
         replaceReddit = mkOption {
           type = types.str;
           default = "";
           example = "teddit.net";
-          description = lib.mdDoc "Replace Reddit links with links to this instance (blank to disable).";
+          description = "Replace Reddit links with links to this instance (blank to disable).";
         };
 
         mp4Playback = mkOption {
           type = types.bool;
           default = true;
-          description = lib.mdDoc "Enable MP4 video playback.";
+          description = "Enable MP4 video playback.";
         };
 
         hlsPlayback = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Enable HLS video streaming (requires JavaScript).";
+          description = "Enable HLS video streaming (requires JavaScript).";
         };
 
         proxyVideos = mkOption {
           type = types.bool;
           default = true;
-          description = lib.mdDoc "Proxy video streaming through the server (might be slow).";
+          description = "Proxy video streaming through the server (might be slow).";
         };
 
         muteVideos = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Mute videos by default.";
+          description = "Mute videos by default.";
         };
 
         autoplayGifs = mkOption {
           type = types.bool;
           default = true;
-          description = lib.mdDoc "Autoplay GIFs.";
+          description = "Autoplay GIFs.";
         };
 
         theme = mkOption {
           type = types.str;
           default = "Nitter";
-          description = lib.mdDoc "Instance theme.";
+          description = "Instance theme.";
         };
 
         infiniteScroll = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Infinite scrolling (requires JavaScript, experimental!).";
+          description = "Infinite scrolling (requires JavaScript, experimental!).";
         };
 
         stickyProfile = mkOption {
           type = types.bool;
           default = true;
-          description = lib.mdDoc "Make profile sidebar stick to top.";
+          description = "Make profile sidebar stick to top.";
         };
 
         bidiSupport = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Support bidirectional text (makes clicking on tweets harder).";
+          description = "Support bidirectional text (makes clicking on tweets harder).";
         };
 
         hideTweetStats = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Hide tweet stats (replies, retweets, likes).";
+          description = "Hide tweet stats (replies, retweets, likes).";
         };
 
         hideBanner = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Hide profile banner.";
+          description = "Hide profile banner.";
         };
 
         hidePins = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Hide pinned tweets.";
+          description = "Hide pinned tweets.";
         };
 
         hideReplies = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Hide tweet replies.";
+          description = "Hide tweet replies.";
         };
 
         squareAvatars = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Square profile pictures.";
+          description = "Square profile pictures.";
         };
       };
 
       settings = mkOption {
         type = types.attrs;
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           Add settings here to override NixOS module generated settings.
 
           Check the official repository for the available settings:
@@ -307,7 +307,7 @@ in
       guestAccounts = mkOption {
         type = types.path;
         default = "/var/lib/nitter/guest_accounts.jsonl";
-        description = lib.mdDoc ''
+        description = ''
           Path to the guest accounts file.
 
           This file contains a list of guest accounts that can be used to
@@ -324,13 +324,13 @@ in
       redisCreateLocally = mkOption {
         type = types.bool;
         default = true;
-        description = lib.mdDoc "Configure local Redis server for Nitter.";
+        description = "Configure local Redis server for Nitter.";
       };
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Open ports in the firewall for Nitter web interface.";
+        description = "Open ports in the firewall for Nitter web interface.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/nix-gc.nix b/nixpkgs/nixos/modules/services/misc/nix-gc.nix
index 656cbad81373..9caca5d74079 100644
--- a/nixpkgs/nixos/modules/services/misc/nix-gc.nix
+++ b/nixpkgs/nixos/modules/services/misc/nix-gc.nix
@@ -15,14 +15,14 @@ in
       automatic = lib.mkOption {
         default = false;
         type = lib.types.bool;
-        description = lib.mdDoc "Automatically run the garbage collector at a specific time.";
+        description = "Automatically run the garbage collector at a specific time.";
       };
 
       dates = lib.mkOption {
         type = lib.types.singleLineStr;
         default = "03:15";
         example = "weekly";
-        description = lib.mdDoc ''
+        description = ''
           How often or when garbage collection is performed. For most desktop and server systems
           a sufficient garbage collection is once a week.
 
@@ -35,7 +35,7 @@ in
         default = "0";
         type = lib.types.singleLineStr;
         example = "45min";
-        description = lib.mdDoc ''
+        description = ''
           Add a randomized delay before each garbage collection.
           The delay will be chosen between zero and this value.
           This value must be a time span in the format specified by
@@ -47,7 +47,7 @@ in
         default = true;
         type = lib.types.bool;
         example = false;
-        description = lib.mdDoc ''
+        description = ''
           Takes a boolean argument. If true, the time when the service
           unit was last triggered is stored on disk. When the timer is
           activated, the service unit is triggered immediately if it
@@ -63,7 +63,7 @@ in
         default = "";
         example = "--max-freed $((64 * 1024**3))";
         type = lib.types.singleLineStr;
-        description = lib.mdDoc ''
+        description = ''
           Options given to [`nix-collect-garbage`](https://nixos.org/manual/nix/stable/command-ref/nix-collect-garbage) when the garbage collector is run automatically.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/nix-optimise.nix b/nixpkgs/nixos/modules/services/misc/nix-optimise.nix
index 0398229a13da..ed33f6746a4e 100644
--- a/nixpkgs/nixos/modules/services/misc/nix-optimise.nix
+++ b/nixpkgs/nixos/modules/services/misc/nix-optimise.nix
@@ -10,13 +10,13 @@ in
       automatic = lib.mkOption {
         default = false;
         type = lib.types.bool;
-        description = lib.mdDoc "Automatically run the nix store optimiser at a specific time.";
+        description = "Automatically run the nix store optimiser at a specific time.";
       };
 
       dates = lib.mkOption {
         default = ["03:45"];
         type = with lib.types; listOf str;
-        description = lib.mdDoc ''
+        description = ''
           Specification (in the format described by
           {manpage}`systemd.time(7)`) of the time at
           which the optimiser will run.
@@ -42,9 +42,11 @@ in
         startAt = lib.optionals cfg.automatic cfg.dates;
       };
 
-      timers.nix-optimise.timerConfig = {
-        Persistent = true;
-        RandomizedDelaySec = 1800;
+      timers.nix-optimise = lib.mkIf cfg.automatic {
+        timerConfig = {
+          Persistent = true;
+          RandomizedDelaySec = 1800;
+        };
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/nix-ssh-serve.nix b/nixpkgs/nixos/modules/services/misc/nix-ssh-serve.nix
index cf9d6339c69b..f60736c688d9 100644
--- a/nixpkgs/nixos/modules/services/misc/nix-ssh-serve.nix
+++ b/nixpkgs/nixos/modules/services/misc/nix-ssh-serve.nix
@@ -14,26 +14,26 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to enable serving the Nix store as a remote store via SSH.";
+        description = "Whether to enable serving the Nix store as a remote store via SSH.";
       };
 
       write = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to enable writing to the Nix store as a remote store via SSH. Note: the sshServe user is named nix-ssh and is not a trusted-user. nix-ssh should be added to the {option}`nix.settings.trusted-users` option in most use cases, such as allowing remote building of derivations.";
+        description = "Whether to enable writing to the Nix store as a remote store via SSH. Note: the sshServe user is named nix-ssh and is not a trusted-user. nix-ssh should be added to the {option}`nix.settings.trusted-users` option in most use cases, such as allowing remote building of derivations.";
       };
 
       keys = mkOption {
         type = types.listOf types.str;
         default = [];
         example = [ "ssh-dss AAAAB3NzaC1k... alice@example.org" ];
-        description = lib.mdDoc "A list of SSH public keys allowed to access the binary cache via SSH.";
+        description = "A list of SSH public keys allowed to access the binary cache via SSH.";
       };
 
       protocol = mkOption {
         type = types.enum [ "ssh" "ssh-ng" ];
         default = "ssh";
-        description = lib.mdDoc "The specific Nix-over-SSH protocol to use.";
+        description = "The specific Nix-over-SSH protocol to use.";
       };
 
     };
diff --git a/nixpkgs/nixos/modules/services/misc/novacomd.nix b/nixpkgs/nixos/modules/services/misc/novacomd.nix
index bde8328d46f8..7cfc68d2b673 100644
--- a/nixpkgs/nixos/modules/services/misc/novacomd.nix
+++ b/nixpkgs/nixos/modules/services/misc/novacomd.nix
@@ -10,7 +10,7 @@ in {
 
   options = {
     services.novacomd = {
-      enable = mkEnableOption (lib.mdDoc "Novacom service for connecting to WebOS devices");
+      enable = mkEnableOption "Novacom service for connecting to WebOS devices";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/misc/ntfy-sh.nix b/nixpkgs/nixos/modules/services/misc/ntfy-sh.nix
index b8b077240115..ae6ab9571d0f 100644
--- a/nixpkgs/nixos/modules/services/misc/ntfy-sh.nix
+++ b/nixpkgs/nixos/modules/services/misc/ntfy-sh.nix
@@ -10,20 +10,20 @@ in
 
 {
   options.services.ntfy-sh = {
-    enable = mkEnableOption (mdDoc "[ntfy-sh](https://ntfy.sh), a push notification service");
+    enable = mkEnableOption "[ntfy-sh](https://ntfy.sh), a push notification service";
 
     package = mkPackageOption pkgs "ntfy-sh" { };
 
     user = mkOption {
       default = "ntfy-sh";
       type = types.str;
-      description = lib.mdDoc "User the ntfy-sh server runs under.";
+      description = "User the ntfy-sh server runs under.";
     };
 
     group = mkOption {
       default = "ntfy-sh";
       type = types.str;
-      description = lib.mdDoc "Primary group of ntfy-sh user.";
+      description = "Primary group of ntfy-sh user.";
     };
 
     settings = mkOption {
@@ -33,7 +33,7 @@ in
           base-url = mkOption {
             type = types.str;
             example = "https://ntfy.example";
-            description = lib.mdDoc ''
+            description = ''
               Public facing base URL of the service
 
               This setting is required for any of the following features:
@@ -55,7 +55,7 @@ in
         }
       '';
 
-      description = mdDoc ''
+      description = ''
         Configuration for ntfy.sh, supported values are [here](https://ntfy.sh/docs/config/#config-options).
       '';
     };
diff --git a/nixpkgs/nixos/modules/services/misc/nzbget.nix b/nixpkgs/nixos/modules/services/misc/nzbget.nix
index d02fda62fa4f..c961fe9b2877 100644
--- a/nixpkgs/nixos/modules/services/misc/nzbget.nix
+++ b/nixpkgs/nixos/modules/services/misc/nzbget.nix
@@ -25,24 +25,24 @@ in
 
   options = {
     services.nzbget = {
-      enable = mkEnableOption (lib.mdDoc "NZBGet");
+      enable = mkEnableOption "NZBGet, for downloading files from news servers";
 
       user = mkOption {
         type = types.str;
         default = "nzbget";
-        description = lib.mdDoc "User account under which NZBGet runs";
+        description = "User account under which NZBGet runs";
       };
 
       group = mkOption {
         type = types.str;
         default = "nzbget";
-        description = lib.mdDoc "Group under which NZBGet runs";
+        description = "Group under which NZBGet runs";
       };
 
       settings = mkOption {
         type = with types; attrsOf (oneOf [ bool int str ]);
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           NZBGet configuration, passed via command line using switch -o. Refer to
           <https://github.com/nzbget/nzbget/blob/master/nzbget.conf>
           for details on supported values.
diff --git a/nixpkgs/nixos/modules/services/misc/nzbhydra2.nix b/nixpkgs/nixos/modules/services/misc/nzbhydra2.nix
index 536a4e4b0075..8246ea52f978 100644
--- a/nixpkgs/nixos/modules/services/misc/nzbhydra2.nix
+++ b/nixpkgs/nixos/modules/services/misc/nzbhydra2.nix
@@ -7,19 +7,18 @@ let cfg = config.services.nzbhydra2;
 in {
   options = {
     services.nzbhydra2 = {
-      enable = mkEnableOption (lib.mdDoc "NZBHydra2");
+      enable = mkEnableOption "NZBHydra2, Usenet meta search";
 
       dataDir = mkOption {
         type = types.str;
         default = "/var/lib/nzbhydra2";
-        description = lib.mdDoc "The directory where NZBHydra2 stores its data files.";
+        description = "The directory where NZBHydra2 stores its data files.";
       };
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description =
-          lib.mdDoc "Open ports in the firewall for the NZBHydra2 web interface.";
+        description = "Open ports in the firewall for the NZBHydra2 web interface.";
       };
 
       package = mkPackageOption pkgs "nzbhydra2" { };
diff --git a/nixpkgs/nixos/modules/services/misc/octoprint.nix b/nixpkgs/nixos/modules/services/misc/octoprint.nix
index 43e0ce0c21d3..6290a6a7a537 100644
--- a/nixpkgs/nixos/modules/services/misc/octoprint.nix
+++ b/nixpkgs/nixos/modules/services/misc/octoprint.nix
@@ -29,12 +29,12 @@ in
 
     services.octoprint = {
 
-      enable = mkEnableOption (lib.mdDoc "OctoPrint, web interface for 3D printers");
+      enable = mkEnableOption "OctoPrint, web interface for 3D printers";
 
       host = mkOption {
         type = types.str;
         default = "0.0.0.0";
-        description = lib.mdDoc ''
+        description = ''
           Host to bind OctoPrint to.
         '';
       };
@@ -42,7 +42,7 @@ in
       port = mkOption {
         type = types.port;
         default = 5000;
-        description = lib.mdDoc ''
+        description = ''
           Port to bind OctoPrint to.
         '';
       };
@@ -50,25 +50,25 @@ in
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Open ports in the firewall for OctoPrint.";
+        description = "Open ports in the firewall for OctoPrint.";
       };
 
       user = mkOption {
         type = types.str;
         default = "octoprint";
-        description = lib.mdDoc "User for the daemon.";
+        description = "User for the daemon.";
       };
 
       group = mkOption {
         type = types.str;
         default = "octoprint";
-        description = lib.mdDoc "Group for the daemon.";
+        description = "Group for the daemon.";
       };
 
       stateDir = mkOption {
         type = types.path;
         default = "/var/lib/octoprint";
-        description = lib.mdDoc "State directory of the daemon.";
+        description = "State directory of the daemon.";
       };
 
       plugins = mkOption {
@@ -76,13 +76,13 @@ in
         default = plugins: [ ];
         defaultText = literalExpression "plugins: []";
         example = literalExpression "plugins: with plugins; [ themeify stlviewer ]";
-        description = lib.mdDoc "Additional plugins to be used. Available plugins are passed through the plugins input.";
+        description = "Additional plugins to be used. Available plugins are passed through the plugins input.";
       };
 
       extraConfig = mkOption {
         type = types.attrs;
         default = { };
-        description = lib.mdDoc "Extra options which are added to OctoPrint's YAML configuration file.";
+        description = "Extra options which are added to OctoPrint's YAML configuration file.";
       };
 
     };
diff --git a/nixpkgs/nixos/modules/services/misc/ollama.nix b/nixpkgs/nixos/modules/services/misc/ollama.nix
index 7a5661510e25..c0341984aa35 100644
--- a/nixpkgs/nixos/modules/services/misc/ollama.nix
+++ b/nixpkgs/nixos/modules/services/misc/ollama.nix
@@ -15,6 +15,55 @@ in
     services.ollama = {
       enable = lib.mkEnableOption "ollama server for local large language models";
       package = lib.mkPackageOption pkgs "ollama" { };
+      home = lib.mkOption {
+        type = types.str;
+        default = "%S/ollama";
+        example = "/home/foo";
+        description = ''
+          The home directory that the ollama service is started in.
+
+          See also `services.ollama.writablePaths` and `services.ollama.sandbox`.
+        '';
+      };
+      models = lib.mkOption {
+        type = types.str;
+        default = "%S/ollama/models";
+        example = "/path/to/ollama/models";
+        description = ''
+          The directory that the ollama service will read models from and download new models to.
+
+          See also `services.ollama.writablePaths` and `services.ollama.sandbox`
+          if downloading models or other mutation of the filesystem is required.
+        '';
+      };
+      sandbox = lib.mkOption {
+        type = types.bool;
+        default = true;
+        example = false;
+        description = ''
+          Whether to enable systemd's sandboxing capabilities.
+
+          This sets [`DynamicUser`](
+          https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#DynamicUser=
+          ), which runs the server as a unique user with read-only access to most of the filesystem.
+
+          See also `services.ollama.writablePaths`.
+        '';
+      };
+      writablePaths = lib.mkOption {
+        type = types.listOf types.str;
+        default = [ ];
+        example = [ "/home/foo" "/mnt/foo" ];
+        description = ''
+          Paths that the server should have write access to.
+
+          This sets [`ReadWritePaths`](
+          https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#ReadWritePaths=
+          ), which allows specified paths to be written to through the default sandboxing.
+
+          See also `services.ollama.sandbox`.
+        '';
+      };
       listenAddress = lib.mkOption {
         type = types.str;
         default = "127.0.0.1:11434";
@@ -24,22 +73,27 @@ in
         '';
       };
       acceleration = lib.mkOption {
-        type = types.nullOr (types.enum [ "rocm" "cuda" ]);
+        type = types.nullOr (types.enum [ false "rocm" "cuda" ]);
         default = null;
         example = "rocm";
         description = ''
           What interface to use for hardware acceleration.
 
-          - `rocm`: supported by modern AMD GPUs
-          - `cuda`: supported by modern NVIDIA GPUs
+          - `null`: default behavior
+            if `nixpkgs.config.rocmSupport` is enabled, uses `"rocm"`
+            if `nixpkgs.config.cudaSupport` is enabled, uses `"cuda"`
+            otherwise defaults to `false`
+          - `false`: disable GPU, only use CPU
+          - `"rocm"`: supported by most modern AMD GPUs
+          - `"cuda"`: supported by most modern NVIDIA GPUs
         '';
       };
       environmentVariables = lib.mkOption {
         type = types.attrsOf types.str;
         default = { };
         example = {
-          HOME = "/tmp";
           OLLAMA_LLM_LIBRARY = "cpu";
+          HIP_VISIBLE_DEVICES = "0,1";
         };
         description = ''
           Set arbitrary environment variables for the ollama service.
@@ -58,15 +112,16 @@ in
       wantedBy = [ "multi-user.target" ];
       after = [ "network.target" ];
       environment = cfg.environmentVariables // {
-        HOME = "%S/ollama";
-        OLLAMA_MODELS = "%S/ollama/models";
+        HOME = cfg.home;
+        OLLAMA_MODELS = cfg.models;
         OLLAMA_HOST = cfg.listenAddress;
       };
       serviceConfig = {
         ExecStart = "${lib.getExe ollamaPackage} serve";
-        WorkingDirectory = "%S/ollama";
+        WorkingDirectory = cfg.home;
         StateDirectory = [ "ollama" ];
-        DynamicUser = true;
+        DynamicUser = cfg.sandbox;
+        ReadWritePaths = cfg.writablePaths;
       };
     };
 
diff --git a/nixpkgs/nixos/modules/services/misc/ombi.nix b/nixpkgs/nixos/modules/services/misc/ombi.nix
index 8bf6a9b116ec..9b2e3cf84e5d 100644
--- a/nixpkgs/nixos/modules/services/misc/ombi.nix
+++ b/nixpkgs/nixos/modules/services/misc/ombi.nix
@@ -7,40 +7,42 @@ let cfg = config.services.ombi;
 in {
   options = {
     services.ombi = {
-      enable = mkEnableOption (lib.mdDoc ''
-        Ombi.
+      enable = mkEnableOption ''
+        Ombi, a web application that automatically gives your shared Plex or
+        Emby users the ability to request content by themselves!
+
         Optionally see <https://docs.ombi.app/info/reverse-proxy>
         on how to set up a reverse proxy
-      '');
+      '';
 
       dataDir = mkOption {
         type = types.str;
         default = "/var/lib/ombi";
-        description = lib.mdDoc "The directory where Ombi stores its data files.";
+        description = "The directory where Ombi stores its data files.";
       };
 
       port = mkOption {
         type = types.port;
         default = 5000;
-        description = lib.mdDoc "The port for the Ombi web interface.";
+        description = "The port for the Ombi web interface.";
       };
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Open ports in the firewall for the Ombi web interface.";
+        description = "Open ports in the firewall for the Ombi web interface.";
       };
 
       user = mkOption {
         type = types.str;
         default = "ombi";
-        description = lib.mdDoc "User account under which Ombi runs.";
+        description = "User account under which Ombi runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "ombi";
-        description = lib.mdDoc "Group under which Ombi runs.";
+        description = "Group under which Ombi runs.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/osrm.nix b/nixpkgs/nixos/modules/services/misc/osrm.nix
index 12c908a761e3..a93337dc75e3 100644
--- a/nixpkgs/nixos/modules/services/misc/osrm.nix
+++ b/nixpkgs/nixos/modules/services/misc/osrm.nix
@@ -11,44 +11,44 @@ in
     enable = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Enable the OSRM service.";
+      description = "Enable the OSRM service.";
     };
 
     address = mkOption {
       type = types.str;
       default = "0.0.0.0";
-      description = lib.mdDoc "IP address on which the web server will listen.";
+      description = "IP address on which the web server will listen.";
     };
 
     port = mkOption {
       type = types.port;
       default = 5000;
-      description = lib.mdDoc "Port on which the web server will run.";
+      description = "Port on which the web server will run.";
     };
 
     threads = mkOption {
       type = types.int;
       default = 4;
-      description = lib.mdDoc "Number of threads to use.";
+      description = "Number of threads to use.";
     };
 
     algorithm = mkOption {
       type = types.enum [ "CH" "CoreCH" "MLD" ];
       default = "MLD";
-      description = lib.mdDoc "Algorithm to use for the data. Must be one of CH, CoreCH, MLD";
+      description = "Algorithm to use for the data. Must be one of CH, CoreCH, MLD";
     };
 
     extraFlags = mkOption {
       type = types.listOf types.str;
       default = [];
       example = [ "--max-table-size 1000" "--max-matching-size 1000" ];
-      description = lib.mdDoc "Extra command line arguments passed to osrm-routed";
+      description = "Extra command line arguments passed to osrm-routed";
     };
 
     dataFile = mkOption {
       type = types.path;
       example = "/var/lib/osrm/berlin-latest.osrm";
-      description = lib.mdDoc "Data file location";
+      description = "Data file location";
     };
 
   };
diff --git a/nixpkgs/nixos/modules/services/misc/owncast.nix b/nixpkgs/nixos/modules/services/misc/owncast.nix
index 01fe34cf50fe..94f0f4e998c4 100644
--- a/nixpkgs/nixos/modules/services/misc/owncast.nix
+++ b/nixpkgs/nixos/modules/services/misc/owncast.nix
@@ -5,12 +5,12 @@ in {
 
   options.services.owncast = {
 
-    enable = mkEnableOption (lib.mdDoc "owncast");
+    enable = mkEnableOption "owncast, a video live streaming solution";
 
     dataDir = mkOption {
       type = types.str;
       default = "/var/lib/owncast";
-      description = lib.mdDoc ''
+      description = ''
         The directory where owncast stores its data files. If left as the default value this directory will automatically be created before the owncast server starts, otherwise the sysadmin is responsible for ensuring the directory exists with appropriate ownership and permissions.
       '';
     };
@@ -18,7 +18,7 @@ in {
     openFirewall = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Open the appropriate ports in the firewall for owncast.
       '';
     };
@@ -26,26 +26,26 @@ in {
     user = mkOption {
       type = types.str;
       default = "owncast";
-      description = lib.mdDoc "User account under which owncast runs.";
+      description = "User account under which owncast runs.";
     };
 
     group = mkOption {
       type = types.str;
       default = "owncast";
-      description = lib.mdDoc "Group under which owncast runs.";
+      description = "Group under which owncast runs.";
     };
 
     listen = mkOption {
       type = types.str;
       default = "127.0.0.1";
       example = "0.0.0.0";
-      description = lib.mdDoc "The IP address to bind the owncast web server to.";
+      description = "The IP address to bind the owncast web server to.";
     };
 
     port = mkOption {
       type = types.port;
       default = 8080;
-      description = lib.mdDoc ''
+      description = ''
         TCP port where owncast web-gui listens.
       '';
     };
@@ -53,7 +53,7 @@ in {
     rtmp-port = mkOption {
       type = types.port;
       default = 1935;
-      description = lib.mdDoc ''
+      description = ''
         TCP port where owncast rtmp service listens.
       '';
     };
diff --git a/nixpkgs/nixos/modules/services/misc/packagekit.nix b/nixpkgs/nixos/modules/services/misc/packagekit.nix
index f4191a4453ca..1be689794d9f 100644
--- a/nixpkgs/nixos/modules/services/misc/packagekit.nix
+++ b/nixpkgs/nixos/modules/services/misc/packagekit.nix
@@ -39,22 +39,22 @@ in
   ];
 
   options.services.packagekit = {
-    enable = mkEnableOption (lib.mdDoc ''
+    enable = mkEnableOption ''
       PackageKit, a cross-platform D-Bus abstraction layer for
       installing software. Software utilizing PackageKit can install
       software regardless of the package manager
-    '');
+    '';
 
     settings = mkOption {
       type = iniFmt.type;
       default = { };
-      description = lib.mdDoc "Additional settings passed straight through to PackageKit.conf";
+      description = "Additional settings passed straight through to PackageKit.conf";
     };
 
     vendorSettings = mkOption {
       type = iniFmt.type;
       default = { };
-      description = lib.mdDoc "Additional settings passed straight through to Vendor.conf";
+      description = "Additional settings passed straight through to Vendor.conf";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/misc/paperless.nix b/nixpkgs/nixos/modules/services/misc/paperless.nix
index 9301d1f68725..e564fe3b8317 100644
--- a/nixpkgs/nixos/modules/services/misc/paperless.nix
+++ b/nixpkgs/nixos/modules/services/misc/paperless.nix
@@ -3,7 +3,6 @@
 with lib;
 let
   cfg = config.services.paperless;
-  pkg = cfg.package;
 
   defaultUser = "paperless";
   defaultFont = "${pkgs.liberation_ttf}/share/fonts/truetype/LiberationSerif-Regular.ttf";
@@ -25,7 +24,7 @@ let
   } // optionalAttrs (cfg.settings.PAPERLESS_ENABLE_NLTK or true) {
     PAPERLESS_NLTK_DIR = pkgs.symlinkJoin {
       name = "paperless_ngx_nltk_data";
-      paths = pkg.nltkData;
+      paths = cfg.package.nltkData;
     };
   } // optionalAttrs (cfg.openMPThreadingWorkaround) {
     OMP_NUM_THREADS = "1";
@@ -38,7 +37,7 @@ let
   manage = pkgs.writeShellScript "manage" ''
     set -o allexport # Export the following env vars
     ${lib.toShellVars env}
-    exec ${pkg}/bin/paperless-ngx "$@"
+    exec ${cfg.package}/bin/paperless-ngx "$@"
   '';
 
   # Secure the services
@@ -96,7 +95,7 @@ in
     enable = mkOption {
       type = lib.types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Enable Paperless.
 
         When started, the Paperless database is automatically created if it doesn't
@@ -111,34 +110,34 @@ in
     dataDir = mkOption {
       type = types.str;
       default = "/var/lib/paperless";
-      description = lib.mdDoc "Directory to store the Paperless data.";
+      description = "Directory to store the Paperless data.";
     };
 
     mediaDir = mkOption {
       type = types.str;
       default = "${cfg.dataDir}/media";
       defaultText = literalExpression ''"''${dataDir}/media"'';
-      description = lib.mdDoc "Directory to store the Paperless documents.";
+      description = "Directory to store the Paperless documents.";
     };
 
     consumptionDir = mkOption {
       type = types.str;
       default = "${cfg.dataDir}/consume";
       defaultText = literalExpression ''"''${dataDir}/consume"'';
-      description = lib.mdDoc "Directory from which new documents are imported.";
+      description = "Directory from which new documents are imported.";
     };
 
     consumptionDirIsPublic = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Whether all users can write to the consumption dir.";
+      description = "Whether all users can write to the consumption dir.";
     };
 
     passwordFile = mkOption {
       type = types.nullOr types.path;
       default = null;
       example = "/run/keys/paperless-password";
-      description = lib.mdDoc ''
+      description = ''
         A file containing the superuser password.
 
         A superuser is required to access the web interface.
@@ -159,13 +158,13 @@ in
     address = mkOption {
       type = types.str;
       default = "localhost";
-      description = lib.mdDoc "Web interface address.";
+      description = "Web interface address.";
     };
 
     port = mkOption {
       type = types.port;
       default = 28981;
-      description = lib.mdDoc "Web interface port.";
+      description = "Web interface port.";
     };
 
     settings = mkOption {
@@ -175,7 +174,7 @@ in
         in oneOf (typeList ++ [ (listOf (oneOf typeList)) (attrsOf (oneOf typeList)) ]));
       };
       default = { };
-      description = lib.mdDoc ''
+      description = ''
         Extra paperless config options.
 
         See [the documentation](https://docs.paperless-ngx.com/configuration/) for available options.
@@ -197,10 +196,23 @@ in
     user = mkOption {
       type = types.str;
       default = defaultUser;
-      description = lib.mdDoc "User under which Paperless runs.";
+      description = "User under which Paperless runs.";
     };
 
-    package = mkPackageOption pkgs "paperless-ngx" { };
+    package = mkPackageOption pkgs "paperless-ngx" { } // {
+      apply = pkg: pkg.override {
+        tesseract5 = pkg.tesseract5.override {
+          # always enable detection modules
+          # tesseract fails to build when eng is not present
+          enableLanguages = if cfg.settings ? PAPERLESS_OCR_LANGUAGE then
+            lists.unique (
+              [ "equ" "osd" "eng" ]
+              ++ lib.splitString "+" cfg.settings.PAPERLESS_OCR_LANGUAGE
+            )
+          else null;
+        };
+      };
+    };
 
     openMPThreadingWorkaround = mkEnableOption ''
       a workaround for document classifier timeouts.
@@ -220,15 +232,16 @@ in
   config = mkIf cfg.enable {
     services.redis.servers.paperless.enable = mkIf enableRedis true;
 
-    systemd.tmpfiles.rules = [
-      "d '${cfg.dataDir}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
-      "d '${cfg.mediaDir}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
-      (if cfg.consumptionDirIsPublic then
-        "d '${cfg.consumptionDir}' 777 - - - -"
-      else
-        "d '${cfg.consumptionDir}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
-      )
-    ];
+    systemd.tmpfiles.settings."10-paperless" = let
+      defaultRule = {
+        inherit (cfg) user;
+        inherit (config.users.users.${cfg.user}) group;
+      };
+    in {
+      "${cfg.dataDir}".d = defaultRule;
+      "${cfg.mediaDir}".d = defaultRule;
+      "${cfg.consumptionDir}".d = if cfg.consumptionDirIsPublic then { mode = "777"; } else defaultRule;
+    };
 
     systemd.services.paperless-scheduler = {
       description = "Paperless Celery Beat";
@@ -236,8 +249,9 @@ in
       wants = [ "paperless-consumer.service" "paperless-web.service" "paperless-task-queue.service" ];
       serviceConfig = defaultServiceConfig // {
         User = cfg.user;
-        ExecStart = "${pkg}/bin/celery --app paperless beat --loglevel INFO";
+        ExecStart = "${cfg.package}/bin/celery --app paperless beat --loglevel INFO";
         Restart = "on-failure";
+        LoadCredential = lib.optionalString (cfg.passwordFile != null) "PAPERLESS_ADMIN_PASSWORD:${cfg.passwordFile}";
       };
       environment = env;
 
@@ -248,8 +262,8 @@ in
         versionFile="${cfg.dataDir}/src-version"
         version=$(cat "$versionFile" 2>/dev/null || echo 0)
 
-        if [[ $version != ${pkg.version} ]]; then
-          ${pkg}/bin/paperless-ngx migrate
+        if [[ $version != ${cfg.package.version} ]]; then
+          ${cfg.package}/bin/paperless-ngx migrate
 
           # Parse old version string format for backwards compatibility
           version=$(echo "$version" | grep -ohP '[^-]+$')
@@ -262,20 +276,20 @@ in
           if versionLessThan 1.12.0; then
             # Reindex documents as mentioned in https://github.com/paperless-ngx/paperless-ngx/releases/tag/v1.12.1
             echo "Reindexing documents, to allow searching old comments. Required after the 1.12.x upgrade."
-            ${pkg}/bin/paperless-ngx document_index reindex
+            ${cfg.package}/bin/paperless-ngx document_index reindex
           fi
 
-          echo ${pkg.version} > "$versionFile"
+          echo ${cfg.package.version} > "$versionFile"
         fi
       ''
       + optionalString (cfg.passwordFile != null) ''
         export PAPERLESS_ADMIN_USER="''${PAPERLESS_ADMIN_USER:-admin}"
-        export PAPERLESS_ADMIN_PASSWORD=$(cat "${cfg.dataDir}/superuser-password")
+        export PAPERLESS_ADMIN_PASSWORD=$(cat $CREDENTIALS_DIRECTORY/PAPERLESS_ADMIN_PASSWORD)
         superuserState="$PAPERLESS_ADMIN_USER:$PAPERLESS_ADMIN_PASSWORD"
         superuserStateFile="${cfg.dataDir}/superuser-state"
 
         if [[ $(cat "$superuserStateFile" 2>/dev/null) != $superuserState ]]; then
-          ${pkg}/bin/paperless-ngx manage_superuser
+          ${cfg.package}/bin/paperless-ngx manage_superuser
           echo "$superuserState" > "$superuserStateFile"
         fi
       '';
@@ -288,7 +302,7 @@ in
       after = [ "paperless-scheduler.service" ];
       serviceConfig = defaultServiceConfig // {
         User = cfg.user;
-        ExecStart = "${pkg}/bin/celery --app paperless worker --loglevel INFO";
+        ExecStart = "${cfg.package}/bin/celery --app paperless worker --loglevel INFO";
         Restart = "on-failure";
         # The `mbind` syscall is needed for running the classifier.
         SystemCallFilter = defaultServiceConfig.SystemCallFilter ++ [ "mbind" ];
@@ -298,19 +312,6 @@ in
       environment = env;
     };
 
-    # Reading the user-provided password file requires root access
-    systemd.services.paperless-copy-password = mkIf (cfg.passwordFile != null) {
-      requiredBy = [ "paperless-scheduler.service" ];
-      before = [ "paperless-scheduler.service" ];
-      serviceConfig = {
-        ExecStart = ''
-          ${pkgs.coreutils}/bin/install --mode 600 --owner '${cfg.user}' --compare \
-            '${cfg.passwordFile}' '${cfg.dataDir}/superuser-password'
-        '';
-        Type = "oneshot";
-      };
-    };
-
     systemd.services.paperless-consumer = {
       description = "Paperless document consumer";
       # Bind to `paperless-scheduler` so that the consumer never runs
@@ -319,7 +320,7 @@ in
       after = [ "paperless-scheduler.service" ];
       serviceConfig = defaultServiceConfig // {
         User = cfg.user;
-        ExecStart = "${pkg}/bin/paperless-ngx document_consumer";
+        ExecStart = "${cfg.package}/bin/paperless-ngx document_consumer";
         Restart = "on-failure";
       };
       environment = env;
@@ -351,8 +352,8 @@ in
           echo "PAPERLESS_SECRET_KEY is empty, refusing to start."
           exit 1
         fi
-        exec ${pkg.python.pkgs.gunicorn}/bin/gunicorn \
-          -c ${pkg}/lib/paperless-ngx/gunicorn.conf.py paperless.asgi:application
+        exec ${cfg.package.python.pkgs.gunicorn}/bin/gunicorn \
+          -c ${cfg.package}/lib/paperless-ngx/gunicorn.conf.py paperless.asgi:application
       '';
       serviceConfig = defaultServiceConfig // {
         User = cfg.user;
@@ -368,7 +369,7 @@ in
         CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
       };
       environment = env // {
-        PYTHONPATH = "${pkg.python.pkgs.makePythonPath pkg.propagatedBuildInputs}:${pkg}/lib/paperless-ngx/src";
+        PYTHONPATH = "${cfg.package.python.pkgs.makePythonPath cfg.package.propagatedBuildInputs}:${cfg.package}/lib/paperless-ngx/src";
       };
       # Allow the web interface to access the private /tmp directory of the server.
       # This is required to support uploading files via the web interface.
diff --git a/nixpkgs/nixos/modules/services/misc/parsoid.nix b/nixpkgs/nixos/modules/services/misc/parsoid.nix
index 6f4a340c8a18..a1935d202172 100644
--- a/nixpkgs/nixos/modules/services/misc/parsoid.nix
+++ b/nixpkgs/nixos/modules/services/misc/parsoid.nix
@@ -39,7 +39,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable Parsoid -- bidirectional
           wikitext parser.
         '';
@@ -48,7 +48,7 @@ in
       wikis = mkOption {
         type = types.listOf (types.either types.str types.attrs);
         example = [ "http://localhost/api.php" ];
-        description = lib.mdDoc ''
+        description = ''
           Used MediaWiki API endpoints.
         '';
       };
@@ -56,7 +56,7 @@ in
       workers = mkOption {
         type = types.int;
         default = 2;
-        description = lib.mdDoc ''
+        description = ''
           Number of Parsoid workers.
         '';
       };
@@ -64,7 +64,7 @@ in
       interface = mkOption {
         type = types.str;
         default = "127.0.0.1";
-        description = lib.mdDoc ''
+        description = ''
           Interface to listen on.
         '';
       };
@@ -72,7 +72,7 @@ in
       port = mkOption {
         type = types.port;
         default = 8000;
-        description = lib.mdDoc ''
+        description = ''
           Port to listen on.
         '';
       };
@@ -80,7 +80,7 @@ in
       extraConfig = mkOption {
         type = types.attrs;
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           Extra configuration to add to parsoid configuration.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/persistent-evdev.nix b/nixpkgs/nixos/modules/services/misc/persistent-evdev.nix
index b1f367fec7fb..650752abd215 100644
--- a/nixpkgs/nixos/modules/services/misc/persistent-evdev.nix
+++ b/nixpkgs/nixos/modules/services/misc/persistent-evdev.nix
@@ -11,12 +11,12 @@ let
 in
 {
   options.services.persistent-evdev = {
-    enable = lib.mkEnableOption (lib.mdDoc "virtual input devices that persist even if the backing device is hotplugged");
+    enable = lib.mkEnableOption "virtual input devices that persist even if the backing device is hotplugged";
 
     devices = lib.mkOption {
       default = {};
       type = with lib.types; attrsOf str;
-      description = lib.mdDoc ''
+      description = ''
         A set of virtual proxy device labels with backing physical device ids.
 
         Physical devices should already exist in {file}`/dev/input/by-id/`.
diff --git a/nixpkgs/nixos/modules/services/misc/pinnwand.nix b/nixpkgs/nixos/modules/services/misc/pinnwand.nix
index 5fca9f4125a8..9c26864dab56 100644
--- a/nixpkgs/nixos/modules/services/misc/pinnwand.nix
+++ b/nixpkgs/nixos/modules/services/misc/pinnwand.nix
@@ -10,17 +10,17 @@ let
 in
 {
   options.services.pinnwand = {
-    enable = mkEnableOption (lib.mdDoc "Pinnwand");
+    enable = mkEnableOption "Pinnwand, a pastebin";
 
     port = mkOption {
       type = types.port;
-      description = lib.mdDoc "The port to listen on.";
+      description = "The port to listen on.";
       default = 8000;
     };
 
     settings = mkOption {
       default = {};
-      description = lib.mdDoc ''
+      description = ''
         Your {file}`pinnwand.toml` as a Nix attribute set. Look up
         possible options in the [documentation](https://pinnwand.readthedocs.io/en/v${pkgs.pinnwand.version}/configuration.html).
       '';
@@ -31,7 +31,7 @@ in
             type = types.str;
             default = "sqlite:////var/lib/pinnwand/pinnwand.db";
             example = "sqlite:///:memory";
-            description = lib.mdDoc ''
+            description = ''
               Database URI compatible with [SQLAlchemyhttps://docs.sqlalchemy.org/en/14/core/engines.html#database-urls].
 
               Additional packages may need to be introduced into the environment for certain databases.
@@ -42,7 +42,7 @@ in
             type = types.ints.positive;
             default = 262144;
             example = 524288;
-            description = lib.mdDoc ''
+            description = ''
               Maximum size of a paste in bytes.
             '';
           };
@@ -51,7 +51,7 @@ in
             default = ''
               <p>Welcome to pinnwand, this site is a pastebin. It allows you to share code with others. If you write code in the text area below and press the paste button you will be given a link you can share with others so they can view your code as well.</p><p>People with the link can view your pasted code, only you can remove your paste and it expires automatically. Note that anyone could guess the URI to your paste so don't rely on it being private.</p>
               '';
-            description = lib.mdDoc ''
+            description = ''
               Raw HTML help text shown in the header area.
             '';
           };
@@ -60,7 +60,7 @@ in
             default = ''
               View <a href="//github.com/supakeen/pinnwand" target="_BLANK">source code</a>, the <a href="/removal">removal</a> or <a href="/expiry">expiry</a> stories, or read the <a href="/about">about</a> page.
             '';
-            description = lib.mdDoc ''
+            description = ''
               The footer in raw HTML.
             '';
           };
diff --git a/nixpkgs/nixos/modules/services/misc/plex.nix b/nixpkgs/nixos/modules/services/misc/plex.nix
index 164801605713..fcd8ebbac6ed 100644
--- a/nixpkgs/nixos/modules/services/misc/plex.nix
+++ b/nixpkgs/nixos/modules/services/misc/plex.nix
@@ -12,12 +12,12 @@ in
 
   options = {
     services.plex = {
-      enable = mkEnableOption (lib.mdDoc "Plex Media Server");
+      enable = mkEnableOption "Plex Media Server";
 
       dataDir = mkOption {
         type = types.str;
         default = "/var/lib/plex";
-        description = lib.mdDoc ''
+        description = ''
           The directory where Plex stores its data files.
         '';
       };
@@ -25,7 +25,7 @@ in
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Open ports in the firewall for the media server.
         '';
       };
@@ -33,7 +33,7 @@ in
       user = mkOption {
         type = types.str;
         default = "plex";
-        description = lib.mdDoc ''
+        description = ''
           User account under which Plex runs.
         '';
       };
@@ -41,7 +41,7 @@ in
       group = mkOption {
         type = types.str;
         default = "plex";
-        description = lib.mdDoc ''
+        description = ''
           Group under which Plex runs.
         '';
       };
@@ -49,7 +49,7 @@ in
       extraPlugins = mkOption {
         type = types.listOf types.path;
         default = [];
-        description = lib.mdDoc ''
+        description = ''
           A list of paths to extra plugin bundles to install in Plex's plugin
           directory. Every time the systemd unit for Plex starts up, all of the
           symlinks in Plex's plugin directory will be cleared and this module
@@ -73,7 +73,7 @@ in
       extraScanners = mkOption {
         type = types.listOf types.path;
         default = [];
-        description = lib.mdDoc ''
+        description = ''
           A list of paths to extra scanners to install in Plex's scanners
           directory.
 
diff --git a/nixpkgs/nixos/modules/services/misc/plikd.nix b/nixpkgs/nixos/modules/services/misc/plikd.nix
index 9b0825bf40c9..ec94cfc02979 100644
--- a/nixpkgs/nixos/modules/services/misc/plikd.nix
+++ b/nixpkgs/nixos/modules/services/misc/plikd.nix
@@ -11,18 +11,18 @@ in
 {
   options = {
     services.plikd = {
-      enable = mkEnableOption (lib.mdDoc "the plikd server");
+      enable = mkEnableOption "plikd, a temporary file upload system";
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Open ports in the firewall for the plikd.";
+        description = "Open ports in the firewall for the plikd.";
       };
 
       settings = mkOption {
         type = format.type;
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           Configuration for plikd, see <https://github.com/root-gg/plik/blob/master/server/plikd.cfg>
           for supported values.
         '';
diff --git a/nixpkgs/nixos/modules/services/misc/podgrab.nix b/nixpkgs/nixos/modules/services/misc/podgrab.nix
index c596122fd31c..50dc70e2bd76 100644
--- a/nixpkgs/nixos/modules/services/misc/podgrab.nix
+++ b/nixpkgs/nixos/modules/services/misc/podgrab.nix
@@ -1,16 +1,18 @@
 { config, lib, pkgs, ... }:
 let
   cfg = config.services.podgrab;
+
+  stateDir = "/var/lib/podgrab";
 in
 {
   options.services.podgrab = with lib; {
-    enable = mkEnableOption (lib.mdDoc "Podgrab, a self-hosted podcast manager");
+    enable = mkEnableOption "Podgrab, a self-hosted podcast manager";
 
     passwordFile = mkOption {
       type = with types; nullOr str;
       default = null;
       example = "/run/secrets/password.env";
-      description = lib.mdDoc ''
+      description = ''
         The path to a file containing the PASSWORD environment variable
         definition for Podgrab's authentication.
       '';
@@ -20,30 +22,61 @@ in
       type = types.port;
       default = 8080;
       example = 4242;
-      description = lib.mdDoc "The port on which Podgrab will listen for incoming HTTP traffic.";
+      description = "The port on which Podgrab will listen for incoming HTTP traffic.";
+    };
+
+    dataDirectory = mkOption {
+      type = types.path;
+      default = "${stateDir}/data";
+      example = "/mnt/podcasts";
+      description = "Directory to store downloads.";
+    };
+
+    user = mkOption {
+      type = types.str;
+      default = "podgrab";
+      description = "User under which Podgrab runs, and which owns the download directory.";
+    };
+
+    group = mkOption {
+      type = types.str;
+      default = "podgrab";
+      description = "Group under which Podgrab runs, and which owns the download directory.";
     };
   };
 
   config = lib.mkIf cfg.enable {
+    systemd.tmpfiles.settings."10-pyload" = {
+      ${cfg.dataDirectory}.d = { inherit (cfg) user group; };
+    };
+
     systemd.services.podgrab = {
       description = "Podgrab podcast manager";
       wantedBy = [ "multi-user.target" ];
       environment = {
-        CONFIG = "/var/lib/podgrab/config";
-        DATA = "/var/lib/podgrab/data";
+        CONFIG = "${stateDir}/config";
+        DATA = cfg.dataDirectory;
         GIN_MODE = "release";
         PORT = toString cfg.port;
       };
       serviceConfig = {
-        DynamicUser = true;
+        User = cfg.user;
+        Group = cfg.group;
         EnvironmentFile = lib.optionals (cfg.passwordFile != null) [
           cfg.passwordFile
         ];
         ExecStart = "${pkgs.podgrab}/bin/podgrab";
         WorkingDirectory = "${pkgs.podgrab}/share";
-        StateDirectory = [ "podgrab/config" "podgrab/data" ];
+        StateDirectory = [ "podgrab/config" ];
       };
     };
+
+    users.users.podgrab = lib.mkIf (cfg.user == "podgrab") {
+      isSystemUser = true;
+      group = cfg.group;
+    };
+
+    users.groups.podgrab = lib.mkIf (cfg.group == "podgrab") { };
   };
 
   meta.maintainers = with lib.maintainers; [ ambroisie ];
diff --git a/nixpkgs/nixos/modules/services/misc/polaris.nix b/nixpkgs/nixos/modules/services/misc/polaris.nix
index 83da486083b4..4ac99eaad384 100644
--- a/nixpkgs/nixos/modules/services/misc/polaris.nix
+++ b/nixpkgs/nixos/modules/services/misc/polaris.nix
@@ -11,33 +11,33 @@ in
 {
   options = {
     services.polaris = {
-      enable = mkEnableOption (lib.mdDoc "Polaris Music Server");
+      enable = mkEnableOption "Polaris Music Server";
 
       package = mkPackageOption pkgs "polaris" { };
 
       user = mkOption {
         type = types.str;
         default = "polaris";
-        description = lib.mdDoc "User account under which Polaris runs.";
+        description = "User account under which Polaris runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "polaris";
-        description = lib.mdDoc "Group under which Polaris is run.";
+        description = "Group under which Polaris is run.";
       };
 
       extraGroups = mkOption {
         type = types.listOf types.str;
         default = [];
-        description = lib.mdDoc "Polaris' auxiliary groups.";
+        description = "Polaris' auxiliary groups.";
         example = literalExpression ''["media" "music"]'';
       };
 
       port = mkOption {
         type = types.port;
         default = 5050;
-        description = lib.mdDoc ''
+        description = ''
           The port which the Polaris REST api and web UI should listen to.
           Note: polaris is hardcoded to listen to the hostname "0.0.0.0".
         '';
@@ -46,7 +46,7 @@ in
       settings = mkOption {
         type = settingsFormat.type;
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           Contents for the TOML Polaris config, applied each start.
           Although poorly documented, an example may be found here:
           [test-config.toml](https://github.com/agersant/polaris/blob/374d0ca56fc0a466d797a4b252e2078607476797/test-data/config.toml)
@@ -73,7 +73,7 @@ in
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Open the configured port in the firewall.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/portunus.nix b/nixpkgs/nixos/modules/services/misc/portunus.nix
index ebb3bc8f0851..ab78479c96cd 100644
--- a/nixpkgs/nixos/modules/services/misc/portunus.nix
+++ b/nixpkgs/nixos/modules/services/misc/portunus.nix
@@ -8,18 +8,18 @@ let
 in
 {
   options.services.portunus = {
-    enable = mkEnableOption (lib.mdDoc "Portunus, a self-contained user/group management and authentication service for LDAP");
+    enable = mkEnableOption "Portunus, a self-contained user/group management and authentication service for LDAP";
 
     domain = mkOption {
       type = types.str;
       example = "sso.example.com";
-      description = lib.mdDoc "Subdomain which gets reverse proxied to Portunus webserver.";
+      description = "Subdomain which gets reverse proxied to Portunus webserver.";
     };
 
     port = mkOption {
       type = types.port;
       default = 8080;
-      description = lib.mdDoc ''
+      description = ''
         Port where the Portunus webserver should listen on.
 
         This must be put behind a TLS-capable reverse proxy because Portunus only listens on localhost.
@@ -31,7 +31,7 @@ in
     seedPath = mkOption {
       type = types.nullOr types.path;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         Path to a portunus seed file in json format.
         See <https://github.com/majewsky/portunus#seeding-users-and-groups-from-static-configuration> for available options.
       '';
@@ -40,7 +40,7 @@ in
     seedSettings = lib.mkOption {
       type = with lib.types; nullOr (attrsOf (listOf (attrsOf anything)));
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         Seed settings for users and groups.
         See upstream for format <https://github.com/majewsky/portunus#seeding-users-and-groups-from-static-configuration>
       '';
@@ -49,40 +49,40 @@ in
     stateDir = mkOption {
       type = types.path;
       default = "/var/lib/portunus";
-      description = lib.mdDoc "Path where Portunus stores its state.";
+      description = "Path where Portunus stores its state.";
     };
 
     user = mkOption {
       type = types.str;
       default = "portunus";
-      description = lib.mdDoc "User account under which Portunus runs its webserver.";
+      description = "User account under which Portunus runs its webserver.";
     };
 
     group = mkOption {
       type = types.str;
       default = "portunus";
-      description = lib.mdDoc "Group account under which Portunus runs its webserver.";
+      description = "Group account under which Portunus runs its webserver.";
     };
 
     dex = {
-      enable = mkEnableOption (lib.mdDoc ''
+      enable = mkEnableOption ''
         Dex ldap connector.
 
         To activate dex, first a search user must be created in the Portunus web ui
         and then the password must to be set as the `DEX_SEARCH_USER_PASSWORD` environment variable
         in the [](#opt-services.dex.environmentFile) setting.
-      '');
+      '';
 
       oidcClients = mkOption {
         type = types.listOf (types.submodule {
           options = {
             callbackURL = mkOption {
               type = types.str;
-              description = lib.mdDoc "URL where the OIDC client should redirect";
+              description = "URL where the OIDC client should redirect";
             };
             id = mkOption {
               type = types.str;
-              description = lib.mdDoc "ID of the OIDC client";
+              description = "ID of the OIDC client";
             };
           };
         });
@@ -93,7 +93,7 @@ in
             id = "service";
           }
         ];
-        description = lib.mdDoc ''
+        description = ''
           List of OIDC clients.
 
           The OIDC secret must be set as the `DEX_CLIENT_''${id}` environment variable
@@ -104,7 +104,7 @@ in
       port = mkOption {
         type = types.port;
         default = 5556;
-        description = lib.mdDoc "Port where dex should listen on.";
+        description = "Port where dex should listen on.";
       };
     };
 
@@ -116,14 +116,14 @@ in
         # TODO: remove in NixOS 24.11 (cf. same note on pkgs/servers/portunus/default.nix)
         default = pkgs.openldap.override { libxcrypt = pkgs.libxcrypt-legacy; };
         defaultText = lib.literalExpression "pkgs.openldap.override { libxcrypt = pkgs.libxcrypt-legacy; }";
-        description = lib.mdDoc "The OpenLDAP package to use.";
+        description = "The OpenLDAP package to use.";
       };
 
       searchUserName = mkOption {
         type = types.str;
         default = "";
         example = "admin";
-        description = lib.mdDoc ''
+        description = ''
           The login name of the search user.
           This user account must be configured in Portunus either manually or via seeding.
         '';
@@ -132,7 +132,7 @@ in
       suffix = mkOption {
         type = types.str;
         example = "dc=example,dc=org";
-        description = lib.mdDoc ''
+        description = ''
           The DN of the topmost entry in your LDAP directory.
           Please refer to the Portunus documentation for more information on how this impacts the structure of the LDAP directory.
         '';
@@ -141,7 +141,7 @@ in
       tls = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable LDAPS protocol.
           This also adds two entries to the `/etc/hosts` file to point [](#opt-services.portunus.domain) to localhost,
           so that CLIs and programs can use ldaps protocol and verify the certificate without opening the firewall port for the protocol.
@@ -153,13 +153,13 @@ in
       user = mkOption {
         type = types.str;
         default = "openldap";
-        description = lib.mdDoc "User account under which Portunus runs its LDAP server.";
+        description = "User account under which Portunus runs its LDAP server.";
       };
 
       group = mkOption {
         type = types.str;
         default = "openldap";
-        description = lib.mdDoc "Group account under which Portunus runs its LDAP server.";
+        description = "Group account under which Portunus runs its LDAP server.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/prowlarr.nix b/nixpkgs/nixos/modules/services/misc/prowlarr.nix
index 84d365003992..c94882a4f72a 100644
--- a/nixpkgs/nixos/modules/services/misc/prowlarr.nix
+++ b/nixpkgs/nixos/modules/services/misc/prowlarr.nix
@@ -9,14 +9,14 @@ in
 {
   options = {
     services.prowlarr = {
-      enable = mkEnableOption (lib.mdDoc "Prowlarr");
+      enable = mkEnableOption "Prowlarr, an indexer manager/proxy for Torrent trackers and Usenet indexers";
 
       package = mkPackageOption pkgs "prowlarr" { };
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Open ports in the firewall for the Prowlarr web interface.";
+        description = "Open ports in the firewall for the Prowlarr web interface.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/pufferpanel.nix b/nixpkgs/nixos/modules/services/misc/pufferpanel.nix
index b951d60cc5b9..3679d25861e6 100644
--- a/nixpkgs/nixos/modules/services/misc/pufferpanel.nix
+++ b/nixpkgs/nixos/modules/services/misc/pufferpanel.nix
@@ -7,7 +7,7 @@ in
     enable = lib.mkOption {
       type = lib.types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Whether to enable PufferPanel game management server.
 
         Note that [PufferPanel templates] and binaries downloaded by PufferPanel
@@ -39,7 +39,7 @@ in
       type = lib.types.listOf lib.types.str;
       default = [ ];
       example = [ "podman" ];
-      description = lib.mdDoc ''
+      description = ''
         Additional groups for the systemd service.
       '';
     };
@@ -48,7 +48,7 @@ in
       type = lib.types.listOf lib.types.package;
       default = [ ];
       example = lib.literalExpression "[ pkgs.jre ]";
-      description = lib.mdDoc ''
+      description = ''
         Packages to add to the PATH environment variable. Both the {file}`bin`
         and {file}`sbin` subdirectories of each package are added.
       '';
@@ -66,7 +66,7 @@ in
           PUFFER_PANEL_REGISTRATIONENABLED = "false";
         }
       '';
-      description = lib.mdDoc ''
+      description = ''
         Environment variables to set for the service. Secrets should be
         specified using {option}`environmentFile`.
 
@@ -93,7 +93,7 @@ in
     environmentFile = lib.mkOption {
       type = lib.types.nullOr lib.types.path;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         File to load environment variables from. Loaded variables override
         values set in {option}`environment`.
       '';
diff --git a/nixpkgs/nixos/modules/services/misc/pykms.nix b/nixpkgs/nixos/modules/services/misc/pykms.nix
index be3accc0d7e5..d1b209e38932 100644
--- a/nixpkgs/nixos/modules/services/misc/pykms.nix
+++ b/nixpkgs/nixos/modules/services/misc/pykms.nix
@@ -18,43 +18,43 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to enable the PyKMS service.";
+        description = "Whether to enable the PyKMS service.";
       };
 
       listenAddress = mkOption {
         type = types.str;
         default = "0.0.0.0";
-        description = lib.mdDoc "The IP address on which to listen.";
+        description = "The IP address on which to listen.";
       };
 
       port = mkOption {
         type = types.port;
         default = 1688;
-        description = lib.mdDoc "The port on which to listen.";
+        description = "The port on which to listen.";
       };
 
       openFirewallPort = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether the listening port should be opened automatically.";
+        description = "Whether the listening port should be opened automatically.";
       };
 
       memoryLimit = mkOption {
         type = types.str;
         default = "64M";
-        description = lib.mdDoc "How much memory to use at most.";
+        description = "How much memory to use at most.";
       };
 
       logLevel = mkOption {
         type = types.enum [ "CRITICAL" "ERROR" "WARNING" "INFO" "DEBUG" "MININFO" ];
         default = "INFO";
-        description = lib.mdDoc "How much to log";
+        description = "How much to log";
       };
 
       extraArgs = mkOption {
         type = types.listOf types.str;
         default = [ ];
-        description = lib.mdDoc "Additional arguments";
+        description = "Additional arguments";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/radarr.nix b/nixpkgs/nixos/modules/services/misc/radarr.nix
index a5f264331ed3..d9f78c4e8ee6 100644
--- a/nixpkgs/nixos/modules/services/misc/radarr.nix
+++ b/nixpkgs/nixos/modules/services/misc/radarr.nix
@@ -9,32 +9,32 @@ in
 {
   options = {
     services.radarr = {
-      enable = mkEnableOption (lib.mdDoc "Radarr");
+      enable = mkEnableOption "Radarr, a UsetNet/BitTorrent movie downloader";
 
       package = mkPackageOption pkgs "radarr" { };
 
       dataDir = mkOption {
         type = types.str;
         default = "/var/lib/radarr/.config/Radarr";
-        description = lib.mdDoc "The directory where Radarr stores its data files.";
+        description = "The directory where Radarr stores its data files.";
       };
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Open ports in the firewall for the Radarr web interface.";
+        description = "Open ports in the firewall for the Radarr web interface.";
       };
 
       user = mkOption {
         type = types.str;
         default = "radarr";
-        description = lib.mdDoc "User account under which Radarr runs.";
+        description = "User account under which Radarr runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "radarr";
-        description = lib.mdDoc "Group under which Radarr runs.";
+        description = "Group under which Radarr runs.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/readarr.nix b/nixpkgs/nixos/modules/services/misc/readarr.nix
index 73868b4baa95..b76a70859f75 100644
--- a/nixpkgs/nixos/modules/services/misc/readarr.nix
+++ b/nixpkgs/nixos/modules/services/misc/readarr.nix
@@ -8,12 +8,12 @@ in
 {
   options = {
     services.readarr = {
-      enable = mkEnableOption (lib.mdDoc "Readarr");
+      enable = mkEnableOption "Readarr, a Usenet/BitTorrent ebook downloader";
 
       dataDir = mkOption {
         type = types.str;
         default = "/var/lib/readarr/";
-        description = lib.mdDoc "The directory where Readarr stores its data files.";
+        description = "The directory where Readarr stores its data files.";
       };
 
       package = mkPackageOption pkgs "readarr" { };
@@ -21,7 +21,7 @@ in
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Open ports in the firewall for Readarr
         '';
       };
@@ -29,7 +29,7 @@ in
       user = mkOption {
         type = types.str;
         default = "readarr";
-        description = lib.mdDoc ''
+        description = ''
           User account under which Readarr runs.
         '';
       };
@@ -37,7 +37,7 @@ in
       group = mkOption {
         type = types.str;
         default = "readarr";
-        description = lib.mdDoc ''
+        description = ''
           Group under which Readarr runs.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/redmine.nix b/nixpkgs/nixos/modules/services/misc/redmine.nix
index c1209e34a92b..af1773dab267 100644
--- a/nixpkgs/nixos/modules/services/misc/redmine.nix
+++ b/nixpkgs/nixos/modules/services/misc/redmine.nix
@@ -10,16 +10,22 @@ let
   format = pkgs.formats.yaml {};
   bundle = "${cfg.package}/share/redmine/bin/bundle";
 
-  databaseYml = pkgs.writeText "database.yml" ''
-    production:
-      adapter: ${cfg.database.type}
-      database: ${cfg.database.name}
-      host: ${if (cfg.database.type == "postgresql" && cfg.database.socket != null) then cfg.database.socket else cfg.database.host}
-      port: ${toString cfg.database.port}
-      username: ${cfg.database.user}
-      password: #dbpass#
-      ${optionalString (cfg.database.type == "mysql2" && cfg.database.socket != null) "socket: ${cfg.database.socket}"}
-  '';
+  databaseSettings = {
+    production = {
+      adapter = cfg.database.type;
+      database = if cfg.database.type == "sqlite3" then "${cfg.stateDir}/database.sqlite3" else cfg.database.name;
+    } // optionalAttrs (cfg.database.type != "sqlite3") {
+      host = if (cfg.database.type == "postgresql" && cfg.database.socket != null) then cfg.database.socket else cfg.database.host;
+      port = cfg.database.port;
+      username = cfg.database.user;
+    } // optionalAttrs (cfg.database.type != "sqlite3" && cfg.database.passwordFile != null) {
+      password = "#dbpass#";
+    } // optionalAttrs (cfg.database.type == "mysql2" && cfg.database.socket != null) {
+      socket = cfg.database.socket;
+    };
+  };
+
+  databaseYml = format.generate "database.yml" databaseSettings;
 
   configurationYml = format.generate "configuration.yml" cfg.settings;
   additionalEnvironment = pkgs.writeText "additional_environment.rb" cfg.extraEnv;
@@ -50,7 +56,7 @@ in
   # interface
   options = {
     services.redmine = {
-      enable = mkEnableOption (lib.mdDoc "Redmine");
+      enable = mkEnableOption "Redmine, a project management web application";
 
       package = mkPackageOption pkgs "redmine" {
         example = "redmine.override { ruby = pkgs.ruby_3_2; }";
@@ -59,31 +65,31 @@ in
       user = mkOption {
         type = types.str;
         default = "redmine";
-        description = lib.mdDoc "User under which Redmine is ran.";
+        description = "User under which Redmine is ran.";
       };
 
       group = mkOption {
         type = types.str;
         default = "redmine";
-        description = lib.mdDoc "Group under which Redmine is ran.";
+        description = "Group under which Redmine is ran.";
       };
 
       port = mkOption {
         type = types.port;
         default = 3000;
-        description = lib.mdDoc "Port on which Redmine is ran.";
+        description = "Port on which Redmine is ran.";
       };
 
       stateDir = mkOption {
         type = types.str;
         default = "/var/lib/redmine";
-        description = lib.mdDoc "The state directory, logs and plugins are stored here.";
+        description = "The state directory, logs and plugins are stored here.";
       };
 
       settings = mkOption {
         type = format.type;
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           Redmine configuration ({file}`configuration.yml`). Refer to
           <https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration>
           for details.
@@ -104,7 +110,7 @@ in
       extraEnv = mkOption {
         type = types.lines;
         default = "";
-        description = lib.mdDoc ''
+        description = ''
           Extra configuration in additional_environment.rb.
 
           See <https://svn.redmine.org/redmine/trunk/config/additional_environment.rb.example>
@@ -118,7 +124,7 @@ in
       themes = mkOption {
         type = types.attrsOf types.path;
         default = {};
-        description = lib.mdDoc "Set of themes.";
+        description = "Set of themes.";
         example = literalExpression ''
           {
             dkuk-redmine_alex_skin = builtins.fetchurl {
@@ -132,7 +138,7 @@ in
       plugins = mkOption {
         type = types.attrsOf types.path;
         default = {};
-        description = lib.mdDoc "Set of plugins.";
+        description = "Set of plugins.";
         example = literalExpression ''
           {
             redmine_env_auth = builtins.fetchurl {
@@ -145,42 +151,42 @@ in
 
       database = {
         type = mkOption {
-          type = types.enum [ "mysql2" "postgresql" ];
+          type = types.enum [ "mysql2" "postgresql" "sqlite3" ];
           example = "postgresql";
           default = "mysql2";
-          description = lib.mdDoc "Database engine to use.";
+          description = "Database engine to use.";
         };
 
         host = mkOption {
           type = types.str;
           default = "localhost";
-          description = lib.mdDoc "Database host address.";
+          description = "Database host address.";
         };
 
         port = mkOption {
           type = types.port;
           default = if cfg.database.type == "postgresql" then 5432 else 3306;
           defaultText = literalExpression "3306";
-          description = lib.mdDoc "Database host port.";
+          description = "Database host port.";
         };
 
         name = mkOption {
           type = types.str;
           default = "redmine";
-          description = lib.mdDoc "Database name.";
+          description = "Database name.";
         };
 
         user = mkOption {
           type = types.str;
           default = "redmine";
-          description = lib.mdDoc "Database user.";
+          description = "Database user.";
         };
 
         passwordFile = mkOption {
           type = types.nullOr types.path;
           default = null;
           example = "/run/keys/redmine-dbpassword";
-          description = lib.mdDoc ''
+          description = ''
             A file containing the password corresponding to
             {option}`database.user`.
           '';
@@ -194,13 +200,13 @@ in
             else null;
           defaultText = literalExpression "/run/mysqld/mysqld.sock";
           example = "/run/mysqld/mysqld.sock";
-          description = lib.mdDoc "Path to the unix socket file to use for authentication.";
+          description = "Path to the unix socket file to use for authentication.";
         };
 
         createLocally = mkOption {
           type = types.bool;
           default = true;
-          description = lib.mdDoc "Create the database and database user locally.";
+          description = "Create the database and database user locally.";
         };
       };
 
@@ -208,49 +214,49 @@ in
         subversion = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Subversion integration.";
+          description = "Subversion integration.";
         };
 
         mercurial = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Mercurial integration.";
+          description = "Mercurial integration.";
         };
 
         git = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "git integration.";
+          description = "git integration.";
         };
 
         cvs = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "cvs integration.";
+          description = "cvs integration.";
         };
 
         breezy = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "bazaar integration.";
+          description = "bazaar integration.";
         };
 
         imagemagick = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Allows exporting Gant diagrams as PNG.";
+          description = "Allows exporting Gant diagrams as PNG.";
         };
 
         ghostscript = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc "Allows exporting Gant diagrams as PDF.";
+          description = "Allows exporting Gant diagrams as PDF.";
         };
 
         minimagick_font_path = mkOption {
           type = types.str;
           default = "";
-          description = lib.mdDoc "MiniMagick font path";
+          description = "MiniMagick font path";
           example = "/run/current-system/sw/share/X11/fonts/LiberationSans-Regular.ttf";
         };
       };
@@ -261,7 +267,7 @@ in
   config = mkIf cfg.enable {
 
     assertions = [
-      { assertion = cfg.database.passwordFile != null || cfg.database.socket != null;
+      { assertion = cfg.database.type != "sqlite3" -> cfg.database.passwordFile != null || cfg.database.socket != null;
         message = "one of services.redmine.database.socket or services.redmine.database.passwordFile must be set";
       }
       { assertion = cfg.database.createLocally -> cfg.database.user == cfg.user;
@@ -270,8 +276,8 @@ in
       { assertion = pgsqlLocal -> cfg.database.user == cfg.database.name;
         message = "services.redmine.database.user and services.redmine.database.name must be the same when using a local postgresql database";
       }
-      { assertion = cfg.database.createLocally -> cfg.database.socket != null;
-        message = "services.redmine.database.socket must be set if services.redmine.database.createLocally is set to true";
+      { assertion = (cfg.database.createLocally && cfg.database.type != "sqlite3") -> cfg.database.socket != null;
+        message = "services.redmine.database.socket must be set if services.redmine.database.createLocally is set to true and no sqlite database is used";
       }
       { assertion = cfg.database.createLocally -> cfg.database.host == "localhost";
         message = "services.redmine.database.host must be set to localhost if services.redmine.database.createLocally is set to true";
@@ -395,9 +401,13 @@ in
 
 
         # handle database.passwordFile & permissions
-        DBPASS=${optionalString (cfg.database.passwordFile != null) "$(head -n1 ${cfg.database.passwordFile})"}
         cp -f ${databaseYml} "${cfg.stateDir}/config/database.yml"
-        sed -e "s,#dbpass#,$DBPASS,g" -i "${cfg.stateDir}/config/database.yml"
+
+        ${optionalString ((cfg.database.type != "sqlite3") && (cfg.database.passwordFile != null)) ''
+          DBPASS="$(head -n1 ${cfg.database.passwordFile})"
+          sed -e "s,#dbpass#,$DBPASS,g" -i "${cfg.stateDir}/config/database.yml"
+        ''}
+
         chmod 440 "${cfg.stateDir}/config/database.yml"
 
 
diff --git a/nixpkgs/nixos/modules/services/misc/ripple-data-api.nix b/nixpkgs/nixos/modules/services/misc/ripple-data-api.nix
index 30623a321338..a699ce95cf0e 100644
--- a/nixpkgs/nixos/modules/services/misc/ripple-data-api.nix
+++ b/nixpkgs/nixos/modules/services/misc/ripple-data-api.nix
@@ -35,47 +35,47 @@ let
 in {
   options = {
     services.rippleDataApi = {
-      enable = mkEnableOption (lib.mdDoc "ripple data api");
+      enable = mkEnableOption "ripple data api";
 
       port = mkOption {
-        description = lib.mdDoc "Ripple data api port";
+        description = "Ripple data api port";
         default = 5993;
         type = types.port;
       };
 
       importMode = mkOption {
-        description = lib.mdDoc "Ripple data api import mode.";
+        description = "Ripple data api import mode.";
         default = "liveOnly";
         type = types.enum ["live" "liveOnly"];
       };
 
       minLedger = mkOption {
-        description = lib.mdDoc "Ripple data api minimal ledger to fetch.";
+        description = "Ripple data api minimal ledger to fetch.";
         default = null;
         type = types.nullOr types.int;
       };
 
       maxLedger = mkOption {
-        description = lib.mdDoc "Ripple data api maximal ledger to fetch.";
+        description = "Ripple data api maximal ledger to fetch.";
         default = null;
         type = types.nullOr types.int;
       };
 
       redis = {
         enable = mkOption {
-          description = lib.mdDoc "Whether to enable caching of ripple data to redis.";
+          description = "Whether to enable caching of ripple data to redis.";
           default = true;
           type = types.bool;
         };
 
         host = mkOption {
-          description = lib.mdDoc "Ripple data api redis host.";
+          description = "Ripple data api redis host.";
           default = "localhost";
           type = types.str;
         };
 
         port = mkOption {
-          description = lib.mdDoc "Ripple data api redis port.";
+          description = "Ripple data api redis port.";
           default = 5984;
           type = types.port;
         };
@@ -83,44 +83,44 @@ in {
 
       couchdb = {
         host = mkOption {
-          description = lib.mdDoc "Ripple data api couchdb host.";
+          description = "Ripple data api couchdb host.";
           default = "localhost";
           type = types.str;
         };
 
         port = mkOption {
-          description = lib.mdDoc "Ripple data api couchdb port.";
+          description = "Ripple data api couchdb port.";
           default = 5984;
           type = types.port;
         };
 
         db = mkOption {
-          description = lib.mdDoc "Ripple data api couchdb database.";
+          description = "Ripple data api couchdb database.";
           default = "rippled";
           type = types.str;
         };
 
         user = mkOption {
-          description = lib.mdDoc "Ripple data api couchdb username.";
+          description = "Ripple data api couchdb username.";
           default = "rippled";
           type = types.str;
         };
 
         pass = mkOption {
-          description = lib.mdDoc "Ripple data api couchdb password.";
+          description = "Ripple data api couchdb password.";
           default = "";
           type = types.str;
         };
 
         create = mkOption {
-          description = lib.mdDoc "Whether to create couchdb database needed by ripple data api.";
+          description = "Whether to create couchdb database needed by ripple data api.";
           type = types.bool;
           default = true;
         };
       };
 
       rippleds = mkOption {
-        description = lib.mdDoc "List of rippleds to be used by ripple data api.";
+        description = "List of rippleds to be used by ripple data api.";
         default = [
           "http://s_east.ripple.com:51234"
           "http://s_west.ripple.com:51234"
diff --git a/nixpkgs/nixos/modules/services/misc/rippled.nix b/nixpkgs/nixos/modules/services/misc/rippled.nix
index 68a831894250..3a906f3e714f 100644
--- a/nixpkgs/nixos/modules/services/misc/rippled.nix
+++ b/nixpkgs/nixos/modules/services/misc/rippled.nix
@@ -92,41 +92,41 @@ let
 
       ip = mkOption {
         default = "127.0.0.1";
-        description = lib.mdDoc "Ip where rippled listens.";
+        description = "Ip where rippled listens.";
         type = types.str;
       };
 
       port = mkOption {
-        description = lib.mdDoc "Port where rippled listens.";
+        description = "Port where rippled listens.";
         type = types.port;
       };
 
       protocol = mkOption {
-        description = lib.mdDoc "Protocols expose by rippled.";
+        description = "Protocols expose by rippled.";
         type = types.listOf (types.enum ["http" "https" "ws" "wss" "peer"]);
       };
 
       user = mkOption {
-        description = lib.mdDoc "When set, these credentials will be required on HTTP/S requests.";
+        description = "When set, these credentials will be required on HTTP/S requests.";
         type = types.str;
         default = "";
       };
 
       password = mkOption {
-        description = lib.mdDoc "When set, these credentials will be required on HTTP/S requests.";
+        description = "When set, these credentials will be required on HTTP/S requests.";
         type = types.str;
         default = "";
       };
 
       admin = mkOption {
-        description = lib.mdDoc "A comma-separated list of admin IP addresses.";
+        description = "A comma-separated list of admin IP addresses.";
         type = types.listOf types.str;
         default = ["127.0.0.1"];
       };
 
       ssl = {
         key = mkOption {
-          description = lib.mdDoc ''
+          description = ''
             Specifies the filename holding the SSL key in PEM format.
           '';
           default = null;
@@ -134,7 +134,7 @@ let
         };
 
         cert = mkOption {
-          description = lib.mdDoc ''
+          description = ''
             Specifies the path to the SSL certificate file in PEM format.
             This is not needed if the chain includes it.
           '';
@@ -143,7 +143,7 @@ let
         };
 
         chain = mkOption {
-          description = lib.mdDoc ''
+          description = ''
             If you need a certificate chain, specify the path to the
             certificate chain here. The chain may include the end certificate.
           '';
@@ -157,33 +157,33 @@ let
   dbOptions = {
     options = {
       type = mkOption {
-        description = lib.mdDoc "Rippled database type.";
+        description = "Rippled database type.";
         type = types.enum ["rocksdb" "nudb"];
         default = "rocksdb";
       };
 
       path = mkOption {
-        description = lib.mdDoc "Location to store the database.";
+        description = "Location to store the database.";
         type = types.path;
         default = cfg.databasePath;
         defaultText = literalExpression "config.${opt.databasePath}";
       };
 
       compression = mkOption {
-        description = lib.mdDoc "Whether to enable snappy compression.";
+        description = "Whether to enable snappy compression.";
         type = types.nullOr types.bool;
         default = null;
       };
 
       onlineDelete = mkOption {
-        description = lib.mdDoc "Enable automatic purging of older ledger information.";
+        description = "Enable automatic purging of older ledger information.";
         type = types.nullOr (types.addCheck types.int (v: v > 256));
         default = cfg.ledgerHistory;
         defaultText = literalExpression "config.${opt.ledgerHistory}";
       };
 
       advisoryDelete = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           If set, then require administrative RPC call "can_delete"
           to enable online deletion of ledger records.
         '';
@@ -192,7 +192,7 @@ let
       };
 
       extraOpts = mkOption {
-        description = lib.mdDoc "Extra database options.";
+        description = "Extra database options.";
         type = types.lines;
         default = "";
       };
@@ -207,12 +207,12 @@ in
 
   options = {
     services.rippled = {
-      enable = mkEnableOption (lib.mdDoc "rippled");
+      enable = mkEnableOption "rippled, a decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++";
 
       package = mkPackageOption pkgs "rippled" { };
 
       ports = mkOption {
-        description = lib.mdDoc "Ports exposed by rippled";
+        description = "Ports exposed by rippled";
         type = with types; attrsOf (submodule portOptions);
         default = {
           rpc = {
@@ -236,7 +236,7 @@ in
       };
 
       nodeDb = mkOption {
-        description = lib.mdDoc "Rippled main database options.";
+        description = "Rippled main database options.";
         type = with types; nullOr (submodule dbOptions);
         default = {
           type = "rocksdb";
@@ -251,19 +251,19 @@ in
       };
 
       tempDb = mkOption {
-        description = lib.mdDoc "Rippled temporary database options.";
+        description = "Rippled temporary database options.";
         type = with types; nullOr (submodule dbOptions);
         default = null;
       };
 
       importDb = mkOption {
-        description = lib.mdDoc "Settings for performing a one-time import.";
+        description = "Settings for performing a one-time import.";
         type = with types; nullOr (submodule dbOptions);
         default = null;
       };
 
       nodeSize = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           Rippled size of the node you are running.
           "tiny", "small", "medium", "large", and "huge"
         '';
@@ -272,7 +272,7 @@ in
       };
 
       ips = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           List of hostnames or ips where the Ripple protocol is served.
           For a starter list, you can either copy entries from:
           https://ripple.com/ripple.txt or if you prefer you can let it
@@ -287,7 +287,7 @@ in
       };
 
       ipsFixed = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           List of IP addresses or hostnames to which rippled should always
           attempt to maintain peer connections with. This is useful for
           manually forming private networks, for example to configure a
@@ -301,7 +301,7 @@ in
       };
 
       validators = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           List of nodes to always accept as validators. Nodes are specified by domain
           or public key.
         '';
@@ -316,7 +316,7 @@ in
       };
 
       databasePath = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           Path to the ripple database.
         '';
         type = types.path;
@@ -324,7 +324,7 @@ in
       };
 
       validationQuorum = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           The minimum number of trusted validations a ledger must have before
           the server considers it fully validated.
         '';
@@ -333,7 +333,7 @@ in
       };
 
       ledgerHistory = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           The number of past ledgers to acquire on server startup and the minimum
           to maintain while running.
         '';
@@ -342,7 +342,7 @@ in
       };
 
       fetchDepth = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           The number of past ledgers to serve to other peers that request historical
           ledger data (or "full" for no limit).
         '';
@@ -351,7 +351,7 @@ in
       };
 
       sntpServers = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           IP address or domain of NTP servers to use for time synchronization.;
         '';
         type = types.listOf types.str;
@@ -364,22 +364,22 @@ in
       };
 
       logLevel = mkOption {
-        description = lib.mdDoc "Logging verbosity.";
+        description = "Logging verbosity.";
         type = types.enum ["debug" "error" "info"];
         default = "error";
       };
 
       statsd = {
-        enable = mkEnableOption (lib.mdDoc "statsd monitoring for rippled");
+        enable = mkEnableOption "statsd monitoring for rippled";
 
         address = mkOption {
-          description = lib.mdDoc "The UDP address and port of the listening StatsD server.";
+          description = "The UDP address and port of the listening StatsD server.";
           default = "127.0.0.1:8125";
           type = types.str;
         };
 
         prefix = mkOption {
-          description = lib.mdDoc "A string prepended to each collected metric.";
+          description = "A string prepended to each collected metric.";
           default = "";
           type = types.str;
         };
@@ -388,7 +388,7 @@ in
       extraConfig = mkOption {
         default = "";
         type = types.lines;
-        description = lib.mdDoc ''
+        description = ''
           Extra lines to be added verbatim to the rippled.cfg configuration file.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/rkvm.nix b/nixpkgs/nixos/modules/services/misc/rkvm.nix
index 582e8511ed96..9d41669e00f6 100644
--- a/nixpkgs/nixos/modules/services/misc/rkvm.nix
+++ b/nixpkgs/nixos/modules/services/misc/rkvm.nix
@@ -14,7 +14,7 @@ in
       default = cfg.server.enable || cfg.client.enable;
       defaultText = literalExpression "config.${opt.server.enable} || config.${opt.client.enable}";
       type = types.bool;
-      description = mdDoc ''
+      description = ''
         Whether to enable rkvm, a Virtual KVM switch for Linux machines.
       '';
     };
@@ -32,7 +32,7 @@ in
               listen = mkOption {
                 type = types.str;
                 default = "0.0.0.0:5258";
-                description = mdDoc ''
+                description = ''
                   An internet socket address to listen on, either IPv4 or IPv6.
                 '';
               };
@@ -40,7 +40,7 @@ in
               switch-keys = mkOption {
                 type = types.listOf types.str;
                 default = [ "left-alt" "left-ctrl" ];
-                description = mdDoc ''
+                description = ''
                   A key list specifying a host switch combination.
 
                   _A list of key names is available in <https://github.com/htrefil/rkvm/blob/master/switch-keys.md>._
@@ -50,7 +50,7 @@ in
               certificate = mkOption {
                 type = types.path;
                 default = "/etc/rkvm/certificate.pem";
-                description = mdDoc ''
+                description = ''
                   TLS certificate path.
 
                   ::: {.note}
@@ -62,7 +62,7 @@ in
               key = mkOption {
                 type = types.path;
                 default = "/etc/rkvm/key.pem";
-                description = mdDoc ''
+                description = ''
                   TLS key path.
 
                   ::: {.note}
@@ -73,7 +73,7 @@ in
 
               password = mkOption {
                 type = types.str;
-                description = mdDoc ''
+                description = ''
                   Shared secret token to authenticate the client.
                   Make sure this matches your client's config.
                 '';
@@ -82,7 +82,7 @@ in
           };
 
         default = { };
-        description = mdDoc "Structured server daemon configuration";
+        description = "Structured server daemon configuration";
       };
     };
 
@@ -97,7 +97,7 @@ in
               server = mkOption {
                 type = types.str;
                 example = "192.168.0.123:5258";
-                description = mdDoc ''
+                description = ''
                   An RKVM server's internet socket address, either IPv4 or IPv6.
                 '';
               };
@@ -105,7 +105,7 @@ in
               certificate = mkOption {
                 type = types.path;
                 default = "/etc/rkvm/certificate.pem";
-                description = mdDoc ''
+                description = ''
                   TLS ceritficate path.
 
                   ::: {.note}
@@ -116,7 +116,7 @@ in
 
               password = mkOption {
                 type = types.str;
-                description = mdDoc ''
+                description = ''
                   Shared secret token to authenticate the client.
                   Make sure this matches your server's config.
                 '';
@@ -125,7 +125,7 @@ in
           };
 
         default = {};
-        description = mdDoc "Structured client daemon configuration";
+        description = "Structured client daemon configuration";
       };
     };
 
diff --git a/nixpkgs/nixos/modules/services/misc/rmfakecloud.nix b/nixpkgs/nixos/modules/services/misc/rmfakecloud.nix
index 979f4f14d383..6cc87753aa25 100644
--- a/nixpkgs/nixos/modules/services/misc/rmfakecloud.nix
+++ b/nixpkgs/nixos/modules/services/misc/rmfakecloud.nix
@@ -9,7 +9,7 @@ let
 in {
   options = {
     services.rmfakecloud = {
-      enable = mkEnableOption (lib.mdDoc "rmfakecloud remarkable self-hosted cloud");
+      enable = mkEnableOption "rmfakecloud remarkable self-hosted cloud";
 
       package = mkPackageOption pkgs "rmfakecloud" {
         extraDescription = ''
@@ -22,7 +22,7 @@ in {
       storageUrl = mkOption {
         type = types.str;
         example = "https://local.appspot.com";
-        description = lib.mdDoc ''
+        description = ''
           URL used by the tablet to access the rmfakecloud service.
         '';
       };
@@ -30,7 +30,7 @@ in {
       port = mkOption {
         type = types.port;
         default = 3000;
-        description = lib.mdDoc ''
+        description = ''
           Listening port number.
         '';
       };
@@ -38,7 +38,7 @@ in {
       logLevel = mkOption {
         type = types.enum [ "info" "debug" "warn" "error" ];
         default = "info";
-        description = lib.mdDoc ''
+        description = ''
           Logging level.
         '';
       };
@@ -47,7 +47,7 @@ in {
         type = with types; attrsOf str;
         default = { };
         example = { DATADIR = "/custom/path/for/rmfakecloud/data"; };
-        description = lib.mdDoc ''
+        description = ''
           Extra settings in the form of a set of key-value pairs.
           For tokens and secrets, use `environmentFile` instead.
 
@@ -60,7 +60,7 @@ in {
         type = with types; nullOr path;
         default = null;
         example = "/etc/secrets/rmfakecloud.env";
-        description = lib.mdDoc ''
+        description = ''
           Path to an environment file loaded for the rmfakecloud service.
 
           This can be used to securely store tokens and secrets outside of the
diff --git a/nixpkgs/nixos/modules/services/misc/rshim.nix b/nixpkgs/nixos/modules/services/misc/rshim.nix
index ae13f7d208f6..4a66f61fa40a 100644
--- a/nixpkgs/nixos/modules/services/misc/rshim.nix
+++ b/nixpkgs/nixos/modules/services/misc/rshim.nix
@@ -12,13 +12,13 @@ let
 in
 {
   options.services.rshim = {
-    enable = lib.mkEnableOption (lib.mdDoc "user-space rshim driver for the BlueField SoC");
+    enable = lib.mkEnableOption "user-space rshim driver for the BlueField SoC";
 
     package = lib.mkPackageOption pkgs "rshim-user-space" { };
 
     backend = lib.mkOption {
       type = with lib.types; nullOr (enum [ "usb" "pcie" "pcie_lf" ]);
-      description = lib.mdDoc ''
+      description = ''
         Specify the backend to attach. If not specified, the driver will scan
         all rshim backends unless the `device` option is given with a device
         name specified.
@@ -29,7 +29,7 @@ in
 
     device = lib.mkOption {
       type = with lib.types; nullOr str;
-      description = lib.mdDoc ''
+      description = ''
         Specify the device name to attach. The backend driver can be deduced
         from the device name, thus the `backend` option is not needed.
       '';
@@ -39,7 +39,7 @@ in
 
     index = lib.mkOption {
       type = with lib.types; nullOr int;
-      description = lib.mdDoc ''
+      description = ''
         Specify the index to create device path `/dev/rshim<index>`. It's also
         used to create network interface name `tmfifo_net<index>`. This option
         is needed when multiple rshim instances are running.
@@ -50,7 +50,7 @@ in
 
     log-level = lib.mkOption {
       type = lib.types.int;
-      description = lib.mdDoc ''
+      description = ''
         Specify the log level (0:none, 1:error, 2:warning, 3:notice, 4:debug).
       '';
       default = 2;
@@ -59,7 +59,7 @@ in
 
     config = lib.mkOption {
       type = with lib.types; attrsOf (oneOf [ int str ]);
-      description = lib.mdDoc ''
+      description = ''
         Structural setting for the rshim configuration file
         (`/etc/rshim.conf`). It can be used to specify the static mapping
         between rshim devices and rshim names. It can also be used to ignore
diff --git a/nixpkgs/nixos/modules/services/misc/safeeyes.nix b/nixpkgs/nixos/modules/services/misc/safeeyes.nix
index 9dfa2001bcb7..38970fd77527 100644
--- a/nixpkgs/nixos/modules/services/misc/safeeyes.nix
+++ b/nixpkgs/nixos/modules/services/misc/safeeyes.nix
@@ -16,7 +16,7 @@ in
 
     services.safeeyes = {
 
-      enable = mkEnableOption (lib.mdDoc "the safeeyes OSGi service");
+      enable = mkEnableOption "the safeeyes OSGi service";
 
     };
 
diff --git a/nixpkgs/nixos/modules/services/misc/sdrplay.nix b/nixpkgs/nixos/modules/services/misc/sdrplay.nix
index 2d5333e3885b..d56b1e4124d6 100644
--- a/nixpkgs/nixos/modules/services/misc/sdrplay.nix
+++ b/nixpkgs/nixos/modules/services/misc/sdrplay.nix
@@ -5,7 +5,7 @@ with lib;
     enable = mkOption {
       default = false;
       example = true;
-      description = lib.mdDoc ''
+      description = ''
         Whether to enable the SDRplay API service and udev rules.
 
         ::: {.note}
diff --git a/nixpkgs/nixos/modules/services/misc/serviio.nix b/nixpkgs/nixos/modules/services/misc/serviio.nix
index 18e64030d79d..a9449e54f5b0 100644
--- a/nixpkgs/nixos/modules/services/misc/serviio.nix
+++ b/nixpkgs/nixos/modules/services/misc/serviio.nix
@@ -31,7 +31,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable the Serviio Media Server.
         '';
       };
@@ -39,7 +39,7 @@ in {
       dataDir = mkOption {
         type = types.path;
         default = "/var/lib/serviio";
-        description = lib.mdDoc ''
+        description = ''
           The directory where serviio stores its state, data, etc.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/sickbeard.nix b/nixpkgs/nixos/modules/services/misc/sickbeard.nix
index f141660ced86..51179fdb14d3 100644
--- a/nixpkgs/nixos/modules/services/misc/sickbeard.nix
+++ b/nixpkgs/nixos/modules/services/misc/sickbeard.nix
@@ -20,7 +20,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to enable the sickbeard server.";
+        description = "Whether to enable the sickbeard server.";
       };
       package = mkPackageOption pkgs "sickbeard" {
         example = "sickrage";
@@ -32,28 +32,28 @@ in
       dataDir = mkOption {
         type = types.path;
         default = "/var/lib/${name}";
-        description = lib.mdDoc "Path where to store data files.";
+        description = "Path where to store data files.";
       };
       configFile = mkOption {
         type = types.path;
         default = "${cfg.dataDir}/config.ini";
         defaultText = literalExpression ''"''${config.${opt.dataDir}}/config.ini"'';
-        description = lib.mdDoc "Path to config file.";
+        description = "Path to config file.";
       };
       port = mkOption {
         type = types.ints.u16;
         default = 8081;
-        description = lib.mdDoc "Port to bind to.";
+        description = "Port to bind to.";
       };
       user = mkOption {
         type = types.str;
         default = name;
-        description = lib.mdDoc "User to run the service as";
+        description = "User to run the service as";
       };
       group = mkOption {
         type = types.str;
         default = name;
-        description = lib.mdDoc "Group to run the service as";
+        description = "Group to run the service as";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/signald.nix b/nixpkgs/nixos/modules/services/misc/signald.nix
index 32ba154506ce..45cf1434882f 100644
--- a/nixpkgs/nixos/modules/services/misc/signald.nix
+++ b/nixpkgs/nixos/modules/services/misc/signald.nix
@@ -8,24 +8,24 @@ let
 in
 {
   options.services.signald = {
-    enable = mkEnableOption (lib.mdDoc "the signald service");
+    enable = mkEnableOption "signald, the unofficial daemon for interacting with Signal";
 
     user = mkOption {
       type = types.str;
       default = defaultUser;
-      description = lib.mdDoc "User under which signald runs.";
+      description = "User under which signald runs.";
     };
 
     group = mkOption {
       type = types.str;
       default = defaultUser;
-      description = lib.mdDoc "Group under which signald runs.";
+      description = "Group under which signald runs.";
     };
 
     socketPath = mkOption {
       type = types.str;
       default = "/run/signald/signald.sock";
-      description = lib.mdDoc "Path to the signald socket";
+      description = "Path to the signald socket";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/misc/siproxd.nix b/nixpkgs/nixos/modules/services/misc/siproxd.nix
index 3890962b7cfb..bedc91e3b43c 100644
--- a/nixpkgs/nixos/modules/services/misc/siproxd.nix
+++ b/nixpkgs/nixos/modules/services/misc/siproxd.nix
@@ -37,7 +37,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable the Siproxd SIP
           proxy/masquerading daemon.
         '';
@@ -46,20 +46,20 @@ in
       ifInbound = mkOption {
         type = types.str;
         example = "eth0";
-        description = lib.mdDoc "Local network interface";
+        description = "Local network interface";
       };
 
       ifOutbound = mkOption {
         type = types.str;
         example = "ppp0";
-        description = lib.mdDoc "Public network interface";
+        description = "Public network interface";
       };
 
       hostsAllowReg = mkOption {
         type = types.listOf types.str;
         default = [ ];
         example = [ "192.168.1.0/24" "192.168.2.0/24" ];
-        description = lib.mdDoc ''
+        description = ''
           Access control list for incoming SIP registrations.
         '';
       };
@@ -68,7 +68,7 @@ in
         type = types.listOf types.str;
         default = [ ];
         example = [ "123.45.0.0/16" "123.46.0.0/16" ];
-        description = lib.mdDoc ''
+        description = ''
           Access control list for incoming SIP traffic.
         '';
       };
@@ -77,7 +77,7 @@ in
         type = types.listOf types.str;
         default = [ ];
         example = [ "10.0.0.0/8" "11.0.0.0/8" ];
-        description = lib.mdDoc ''
+        description = ''
           Access control list for denying incoming
           SIP registrations and traffic.
         '';
@@ -86,7 +86,7 @@ in
       sipListenPort = mkOption {
         type = types.int;
         default = 5060;
-        description = lib.mdDoc ''
+        description = ''
           Port to listen for incoming SIP messages.
         '';
       };
@@ -94,7 +94,7 @@ in
       rtpPortLow = mkOption {
         type = types.int;
         default = 7070;
-        description = lib.mdDoc ''
+        description = ''
          Bottom of UDP port range for incoming and outgoing RTP traffic
         '';
       };
@@ -102,7 +102,7 @@ in
       rtpPortHigh = mkOption {
         type = types.int;
         default = 7089;
-        description = lib.mdDoc ''
+        description = ''
          Top of UDP port range for incoming and outgoing RTP traffic
         '';
       };
@@ -110,7 +110,7 @@ in
       rtpTimeout = mkOption {
         type = types.int;
         default = 300;
-        description = lib.mdDoc ''
+        description = ''
           Timeout for an RTP stream. If for the specified
           number of seconds no data is relayed on an active
           stream, it is considered dead and will be killed.
@@ -120,7 +120,7 @@ in
       rtpDscp = mkOption {
         type = types.int;
         default = 46;
-        description = lib.mdDoc ''
+        description = ''
           DSCP (differentiated services) value to be assigned
           to RTP packets. Allows QOS aware routers to handle
           different types traffic with different priorities.
@@ -130,7 +130,7 @@ in
       sipDscp = mkOption {
         type = types.int;
         default = 0;
-        description = lib.mdDoc ''
+        description = ''
           DSCP (differentiated services) value to be assigned
           to SIP packets. Allows QOS aware routers to handle
           different types traffic with different priorities.
@@ -140,7 +140,7 @@ in
       passwordFile = mkOption {
         type = types.str;
         default = "";
-        description = lib.mdDoc ''
+        description = ''
           Path to per-user password file.
         '';
       };
@@ -148,7 +148,7 @@ in
       extraConfig = mkOption {
         type = types.lines;
         default = "";
-        description = lib.mdDoc ''
+        description = ''
           Extra configuration to add to siproxd configuration.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/snapper.nix b/nixpkgs/nixos/modules/services/misc/snapper.nix
index 569433c3c71d..3a3ed1b5c0f5 100644
--- a/nixpkgs/nixos/modules/services/misc/snapper.nix
+++ b/nixpkgs/nixos/modules/services/misc/snapper.nix
@@ -25,7 +25,7 @@ let
   configOptions = {
     SUBVOLUME = mkOption {
       type = types.path;
-      description = lib.mdDoc ''
+      description = ''
         Path of the subvolume or mount point.
         This path is a subvolume and has to contain a subvolume named
         .snapshots.
@@ -36,7 +36,7 @@ let
     FSTYPE = mkOption {
       type = types.enum [ "btrfs" ];
       default = "btrfs";
-      description = lib.mdDoc ''
+      description = ''
         Filesystem type. Only btrfs is stable and tested.
       '';
     };
@@ -44,7 +44,7 @@ let
     ALLOW_GROUPS = mkOption {
       type = types.listOf safeStr;
       default = [];
-      description = lib.mdDoc ''
+      description = ''
         List of groups allowed to operate with the config.
 
         Also see the PERMISSIONS section in man:snapper(8).
@@ -55,7 +55,7 @@ let
       type = types.listOf safeStr;
       default = [];
       example = [ "alice" ];
-      description = lib.mdDoc ''
+      description = ''
         List of users allowed to operate with the config. "root" is always
         implicitly included.
 
@@ -66,7 +66,7 @@ let
     TIMELINE_CLEANUP = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Defines whether the timeline cleanup algorithm should be run for the config.
       '';
     };
@@ -74,7 +74,7 @@ let
     TIMELINE_CREATE = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Defines whether hourly snapshots should be created.
       '';
     };
@@ -87,7 +87,7 @@ in
     snapshotRootOnBoot = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Whether to snapshot root on boot
       '';
     };
@@ -95,7 +95,7 @@ in
     snapshotInterval = mkOption {
       type = types.str;
       default = "hourly";
-      description = lib.mdDoc ''
+      description = ''
         Snapshot interval.
 
         The format is described in
@@ -106,7 +106,7 @@ in
     cleanupInterval = mkOption {
       type = types.str;
       default = "1d";
-      description = lib.mdDoc ''
+      description = ''
         Cleanup interval.
 
         The format is described in
@@ -117,7 +117,7 @@ in
     filters = mkOption {
       type = types.nullOr types.lines;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         Global display difference filter. See man:snapper(8) for more details.
       '';
     };
@@ -135,7 +135,7 @@ in
         }
       '';
 
-      description = lib.mdDoc ''
+      description = ''
         Subvolume configuration. Any option mentioned in man:snapper-configs(5)
         is valid here, even if NixOS doesn't document it.
       '';
diff --git a/nixpkgs/nixos/modules/services/misc/soft-serve.nix b/nixpkgs/nixos/modules/services/misc/soft-serve.nix
index 2b63b6bcd867..1907d92adb85 100644
--- a/nixpkgs/nixos/modules/services/misc/soft-serve.nix
+++ b/nixpkgs/nixos/modules/services/misc/soft-serve.nix
@@ -19,7 +19,7 @@ in
       settings = mkOption {
         type = format.type;
         default = { };
-        description = mdDoc ''
+        description = ''
           The contents of the configuration file for soft-serve.
 
           See <${docUrl}>.
diff --git a/nixpkgs/nixos/modules/services/misc/sonarr.nix b/nixpkgs/nixos/modules/services/misc/sonarr.nix
index ec59988d2b9a..228a2d48f5a9 100644
--- a/nixpkgs/nixos/modules/services/misc/sonarr.nix
+++ b/nixpkgs/nixos/modules/services/misc/sonarr.nix
@@ -8,18 +8,18 @@ in
 {
   options = {
     services.sonarr = {
-      enable = mkEnableOption (lib.mdDoc "Sonarr");
+      enable = mkEnableOption "Sonarr";
 
       dataDir = mkOption {
         type = types.str;
         default = "/var/lib/sonarr/.config/NzbDrone";
-        description = lib.mdDoc "The directory where Sonarr stores its data files.";
+        description = "The directory where Sonarr stores its data files.";
       };
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Open ports in the firewall for the Sonarr web interface
         '';
       };
@@ -27,13 +27,13 @@ in
       user = mkOption {
         type = types.str;
         default = "sonarr";
-        description = lib.mdDoc "User account under which Sonaar runs.";
+        description = "User account under which Sonaar runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "sonarr";
-        description = lib.mdDoc "Group under which Sonaar runs.";
+        description = "Group under which Sonaar runs.";
       };
 
       package = mkPackageOption pkgs "sonarr" { };
diff --git a/nixpkgs/nixos/modules/services/misc/sourcehut/default.nix b/nixpkgs/nixos/modules/services/misc/sourcehut/default.nix
index 557d6d7e7168..94a96dba6790 100644
--- a/nixpkgs/nixos/modules/services/misc/sourcehut/default.nix
+++ b/nixpkgs/nixos/modules/services/misc/sourcehut/default.nix
@@ -56,38 +56,38 @@ let
     })));
   commonServiceSettings = srv: {
     origin = mkOption {
-      description = lib.mdDoc "URL ${srv}.sr.ht is being served at (protocol://domain)";
+      description = "URL ${srv}.sr.ht is being served at (protocol://domain)";
       type = types.str;
       default = "https://${srv}.${domain}";
       defaultText = "https://${srv}.example.com";
     };
     debug-host = mkOption {
-      description = lib.mdDoc "Address to bind the debug server to.";
+      description = "Address to bind the debug server to.";
       type = with types; nullOr str;
       default = null;
     };
     debug-port = mkOption {
-      description = lib.mdDoc "Port to bind the debug server to.";
+      description = "Port to bind the debug server to.";
       type = with types; nullOr str;
       default = null;
     };
     connection-string = mkOption {
-      description = lib.mdDoc "SQLAlchemy connection string for the database.";
+      description = "SQLAlchemy connection string for the database.";
       type = types.str;
       default = "postgresql:///localhost?user=${srv}srht&host=/run/postgresql";
     };
-    migrate-on-upgrade = mkEnableOption (lib.mdDoc "automatic migrations on package upgrade") // { default = true; };
+    migrate-on-upgrade = mkEnableOption "automatic migrations on package upgrade" // { default = true; };
     oauth-client-id = mkOption {
-      description = lib.mdDoc "${srv}.sr.ht's OAuth client id for meta.sr.ht.";
+      description = "${srv}.sr.ht's OAuth client id for meta.sr.ht.";
       type = types.str;
     };
     oauth-client-secret = mkOption {
-      description = lib.mdDoc "${srv}.sr.ht's OAuth client secret for meta.sr.ht.";
+      description = "${srv}.sr.ht's OAuth client secret for meta.sr.ht.";
       type = types.path;
       apply = s: "<" + toString s;
     };
     api-origin = mkOption {
-      description = lib.mdDoc "Origin URL for the API";
+      description = "Origin URL for the API";
       type = types.str;
       default = "http://${cfg.listenAddress}:${toString (cfg.${srv}.port + 100)}";
       defaultText = lib.literalMD ''
@@ -117,57 +117,57 @@ let
     todosrht
   ]);
   mkOptionNullOrStr = description: mkOption {
-    description = lib.mdDoc description;
+    description = description;
     type = with types; nullOr str;
     default = null;
   };
 in
 {
   options.services.sourcehut = {
-    enable = mkEnableOption (lib.mdDoc ''
+    enable = mkEnableOption ''
       sourcehut - git hosting, continuous integration, mailing list, ticket tracking, wiki
       and account management services
-    '');
+    '';
 
     listenAddress = mkOption {
       type = types.str;
       default = "localhost";
-      description = lib.mdDoc "Address to bind to.";
+      description = "Address to bind to.";
     };
 
     python = mkOption {
       internal = true;
       type = types.package;
       default = python;
-      description = lib.mdDoc ''
+      description = ''
         The python package to use. It should contain references to the *srht modules and also
         gunicorn.
       '';
     };
 
     minio = {
-      enable = mkEnableOption (lib.mdDoc ''local minio integration'');
+      enable = mkEnableOption ''local minio integration'';
     };
 
     nginx = {
-      enable = mkEnableOption (lib.mdDoc ''local nginx integration'');
+      enable = mkEnableOption ''local nginx integration'';
       virtualHost = mkOption {
         type = types.attrs;
         default = {};
-        description = lib.mdDoc "Virtual-host configuration merged with all Sourcehut's virtual-hosts.";
+        description = "Virtual-host configuration merged with all Sourcehut's virtual-hosts.";
       };
     };
 
     postfix = {
-      enable = mkEnableOption (lib.mdDoc ''local postfix integration'');
+      enable = mkEnableOption ''local postfix integration'';
     };
 
     postgresql = {
-      enable = mkEnableOption (lib.mdDoc ''local postgresql integration'');
+      enable = mkEnableOption ''local postgresql integration'';
     };
 
     redis = {
-      enable = mkEnableOption (lib.mdDoc ''local redis integration in a dedicated redis-server'');
+      enable = mkEnableOption ''local redis integration in a dedicated redis-server'';
     };
 
     settings = mkOption {
@@ -175,17 +175,17 @@ in
         freeformType = settingsFormat.type;
         options."sr.ht" = {
           global-domain = mkOption {
-            description = lib.mdDoc "Global domain name.";
+            description = "Global domain name.";
             type = types.str;
             example = "example.com";
           };
           environment = mkOption {
-            description = lib.mdDoc "Values other than \"production\" adds a banner to each page.";
+            description = "Values other than \"production\" adds a banner to each page.";
             type = types.enum [ "development" "production" ];
             default = "development";
           };
           network-key = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               An absolute file path (which should be outside the Nix-store)
               to a secret key to encrypt internal messages with. Use `srht-keygen network` to
               generate this key. It must be consistent between all services and nodes.
@@ -194,27 +194,27 @@ in
             apply = s: "<" + toString s;
           };
           owner-email = mkOption {
-            description = lib.mdDoc "Owner's email.";
+            description = "Owner's email.";
             type = types.str;
             default = "contact@example.com";
           };
           owner-name = mkOption {
-            description = lib.mdDoc "Owner's name.";
+            description = "Owner's name.";
             type = types.str;
             default = "John Doe";
           };
           site-blurb = mkOption {
-            description = lib.mdDoc "Blurb for your site.";
+            description = "Blurb for your site.";
             type = types.str;
             default = "the hacker's forge";
           };
           site-info = mkOption {
-            description = lib.mdDoc "The top-level info page for your site.";
+            description = "The top-level info page for your site.";
             type = types.str;
             default = "https://sourcehut.org";
           };
           service-key = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               An absolute file path (which should be outside the Nix-store)
               to a key used for encrypting session cookies. Use `srht-keygen service` to
               generate the service key. This must be shared between each node of the same
@@ -226,12 +226,12 @@ in
             apply = s: "<" + toString s;
           };
           site-name = mkOption {
-            description = lib.mdDoc "The name of your network of sr.ht-based sites.";
+            description = "The name of your network of sr.ht-based sites.";
             type = types.str;
             default = "sourcehut";
           };
           source-url = mkOption {
-            description = lib.mdDoc "The source code for your fork of sr.ht.";
+            description = "The source code for your fork of sr.ht.";
             type = types.str;
             default = "https://git.sr.ht/~sircmpwn/srht";
           };
@@ -239,7 +239,7 @@ in
         options.mail = {
           smtp-host = mkOptionNullOrStr "Outgoing SMTP host.";
           smtp-port = mkOption {
-            description = lib.mdDoc "Outgoing SMTP port.";
+            description = "Outgoing SMTP port.";
             type = with types; nullOr port;
             default = null;
           };
@@ -247,13 +247,13 @@ in
           smtp-password = mkOptionNullOrStr "Outgoing SMTP password.";
           smtp-from = mkOption {
             type = types.str;
-            description = lib.mdDoc "Outgoing SMTP FROM.";
+            description = "Outgoing SMTP FROM.";
           };
           error-to = mkOptionNullOrStr "Address receiving application exceptions";
           error-from = mkOptionNullOrStr "Address sending application exceptions";
           pgp-privkey = mkOption {
             type = types.str;
-            description = lib.mdDoc ''
+            description = ''
               An absolute file path (which should be outside the Nix-store)
               to an OpenPGP private key.
 
@@ -265,26 +265,26 @@ in
           };
           pgp-pubkey = mkOption {
             type = with types; either path str;
-            description = lib.mdDoc "OpenPGP public key.";
+            description = "OpenPGP public key.";
           };
           pgp-key-id = mkOption {
             type = types.str;
-            description = lib.mdDoc "OpenPGP key identifier.";
+            description = "OpenPGP key identifier.";
           };
         };
         options.objects = {
           s3-upstream = mkOption {
-            description = lib.mdDoc "Configure the S3-compatible object storage service.";
+            description = "Configure the S3-compatible object storage service.";
             type = with types; nullOr str;
             default = null;
           };
           s3-access-key = mkOption {
-            description = lib.mdDoc "Access key to the S3-compatible object storage service";
+            description = "Access key to the S3-compatible object storage service";
             type = with types; nullOr str;
             default = null;
           };
           s3-secret-key = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               An absolute file path (which should be outside the Nix-store)
               to the secret key of the S3-compatible object storage service.
             '';
@@ -295,7 +295,7 @@ in
         };
         options.webhooks = {
           private-key = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               An absolute file path (which should be outside the Nix-store)
               to a base64-encoded Ed25519 key for signing webhook payloads.
               This should be consistent for all *.sr.ht sites,
@@ -309,14 +309,14 @@ in
         };
 
         options."builds.sr.ht" = commonServiceSettings "builds" // {
-          allow-free = mkEnableOption (lib.mdDoc "nonpaying users to submit builds");
+          allow-free = mkEnableOption "nonpaying users to submit builds";
           redis = mkOption {
-            description = lib.mdDoc "The Redis connection used for the Celery worker.";
+            description = "The Redis connection used for the Celery worker.";
             type = types.str;
             default = "redis+socket:///run/redis-sourcehut-buildsrht/redis.sock?virtual_host=2";
           };
           shell = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Scripts used to launch on SSH connection.
               `/usr/bin/master-shell` on master,
               `/usr/bin/runner-shell` on runner.
@@ -329,19 +329,19 @@ in
         };
         options."builds.sr.ht::worker" = {
           bind-address = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               HTTP bind address for serving local build information/monitoring.
             '';
             type = types.str;
             default = "localhost:8080";
           };
           buildlogs = mkOption {
-            description = lib.mdDoc "Path to write build logs.";
+            description = "Path to write build logs.";
             type = types.str;
             default = "/var/log/sourcehut/buildsrht-worker";
           };
           name = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Listening address and listening port
               of the build runner (with HTTP port if not 80).
             '';
@@ -349,7 +349,7 @@ in
             default = "localhost:5020";
           };
           timeout = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Max build duration.
               See <https://golang.org/pkg/time/#ParseDuration>.
             '';
@@ -360,12 +360,12 @@ in
 
         options."git.sr.ht" = commonServiceSettings "git" // {
           outgoing-domain = mkOption {
-            description = lib.mdDoc "Outgoing domain.";
+            description = "Outgoing domain.";
             type = types.str;
             default = "https://git.localhost.localdomain";
           };
           post-update-script = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               A post-update script which is installed in every git repo.
               This setting is propagated to newer and existing repositories.
             '';
@@ -374,7 +374,7 @@ in
             defaultText = "\${pkgs.sourcehut.gitsrht}/bin/gitsrht-update-hook";
           };
           repos = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Path to git repositories on disk.
               If changing the default, you must ensure that
               the gitsrht's user as read and write access to it.
@@ -383,14 +383,14 @@ in
             default = "/var/lib/sourcehut/gitsrht/repos";
           };
           webhooks = mkOption {
-            description = lib.mdDoc "The Redis connection used for the webhooks worker.";
+            description = "The Redis connection used for the webhooks worker.";
             type = types.str;
             default = "redis+socket:///run/redis-sourcehut-gitsrht/redis.sock?virtual_host=1";
           };
         };
         options."git.sr.ht::api" = {
           internal-ipnet = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Set of IP subnets which are permitted to utilize internal API
               authentication. This should be limited to the subnets
               from which your *.sr.ht services are running.
@@ -403,7 +403,7 @@ in
 
         options."hg.sr.ht" = commonServiceSettings "hg" // {
           changegroup-script = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               A changegroup script which is installed in every mercurial repo.
               This setting is propagated to newer and existing repositories.
             '';
@@ -412,7 +412,7 @@ in
             defaultText = "\${pkgs.sourcehut.hgsrht}/bin/hgsrht-hook-changegroup";
           };
           repos = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Path to mercurial repositories on disk.
               If changing the default, you must ensure that
               the hgsrht's user as read and write access to it.
@@ -425,18 +425,18 @@ in
             (defaults to where the hgsrht code is)
           '';
           clone_bundle_threshold = mkOption {
-            description = lib.mdDoc ".hg/store size (in MB) past which the nightly job generates clone bundles.";
+            description = ".hg/store size (in MB) past which the nightly job generates clone bundles.";
             type = types.ints.unsigned;
             default = 50;
           };
           hg_ssh = mkOption {
-            description = lib.mdDoc "Path to hg-ssh (if not in $PATH).";
+            description = "Path to hg-ssh (if not in $PATH).";
             type = types.str;
             default = "${pkgs.mercurial}/bin/hg-ssh";
             defaultText = "\${pkgs.mercurial}/bin/hg-ssh";
           };
           webhooks = mkOption {
-            description = lib.mdDoc "The Redis connection used for the webhooks worker.";
+            description = "The Redis connection used for the webhooks worker.";
             type = types.str;
             default = "redis+socket:///run/redis-sourcehut-hgsrht/redis.sock?virtual_host=1";
           };
@@ -446,31 +446,31 @@ in
         };
 
         options."lists.sr.ht" = commonServiceSettings "lists" // {
-          allow-new-lists = mkEnableOption (lib.mdDoc "creation of new lists");
+          allow-new-lists = mkEnableOption "creation of new lists";
           notify-from = mkOption {
-            description = lib.mdDoc "Outgoing email for notifications generated by users.";
+            description = "Outgoing email for notifications generated by users.";
             type = types.str;
             default = "lists-notify@localhost.localdomain";
           };
           posting-domain = mkOption {
-            description = lib.mdDoc "Posting domain.";
+            description = "Posting domain.";
             type = types.str;
             default = "lists.localhost.localdomain";
           };
           redis = mkOption {
-            description = lib.mdDoc "The Redis connection used for the Celery worker.";
+            description = "The Redis connection used for the Celery worker.";
             type = types.str;
             default = "redis+socket:///run/redis-sourcehut-listssrht/redis.sock?virtual_host=2";
           };
           webhooks = mkOption {
-            description = lib.mdDoc "The Redis connection used for the webhooks worker.";
+            description = "The Redis connection used for the webhooks worker.";
             type = types.str;
             default = "redis+socket:///run/redis-sourcehut-listssrht/redis.sock?virtual_host=1";
           };
         };
         options."lists.sr.ht::worker" = {
           reject-mimetypes = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Comma-delimited list of Content-Types to reject. Messages with Content-Types
               included in this list are rejected. Multipart messages are always supported,
               and each part is checked against this list.
@@ -481,12 +481,12 @@ in
             default = ["text/html"];
           };
           reject-url = mkOption {
-            description = lib.mdDoc "Reject URL.";
+            description = "Reject URL.";
             type = types.str;
             default = "https://man.sr.ht/lists.sr.ht/etiquette.md";
           };
           sock = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Path for the lmtp daemon's unix socket. Direct incoming mail to this socket.
               Alternatively, specify IP:PORT and an SMTP server will be run instead.
             '';
@@ -494,7 +494,7 @@ in
             default = "/tmp/lists.sr.ht-lmtp.sock";
           };
           sock-group = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               The lmtp daemon will make the unix socket group-read/write
               for users in this group.
             '';
@@ -510,15 +510,15 @@ in
           removeAttrs (commonServiceSettings "meta")
             ["oauth-client-id" "oauth-client-secret"] // {
           webhooks = mkOption {
-            description = lib.mdDoc "The Redis connection used for the webhooks worker.";
+            description = "The Redis connection used for the webhooks worker.";
             type = types.str;
             default = "redis+socket:///run/redis-sourcehut-metasrht/redis.sock?virtual_host=1";
           };
-          welcome-emails = mkEnableOption (lib.mdDoc "sending stock sourcehut welcome emails after signup");
+          welcome-emails = mkEnableOption "sending stock sourcehut welcome emails after signup";
         };
         options."meta.sr.ht::api" = {
           internal-ipnet = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Set of IP subnets which are permitted to utilize internal API
               authentication. This should be limited to the subnets
               from which your *.sr.ht services are running.
@@ -529,13 +529,13 @@ in
           };
         };
         options."meta.sr.ht::aliases" = mkOption {
-          description = lib.mdDoc "Aliases for the client IDs of commonly used OAuth clients.";
+          description = "Aliases for the client IDs of commonly used OAuth clients.";
           type = with types; attrsOf int;
           default = {};
           example = { "git.sr.ht" = 12345; };
         };
         options."meta.sr.ht::billing" = {
-          enabled = mkEnableOption (lib.mdDoc "the billing system");
+          enabled = mkEnableOption "the billing system";
           stripe-public-key = mkOptionNullOrStr "Public key for Stripe. Get your keys at https://dashboard.stripe.com/account/apikeys";
           stripe-secret-key = mkOptionNullOrStr ''
             An absolute file path (which should be outside the Nix-store)
@@ -545,14 +545,14 @@ in
           };
         };
         options."meta.sr.ht::settings" = {
-          registration = mkEnableOption (lib.mdDoc "public registration");
+          registration = mkEnableOption "public registration";
           onboarding-redirect = mkOption {
-            description = lib.mdDoc "Where to redirect new users upon registration.";
+            description = "Where to redirect new users upon registration.";
             type = types.str;
             default = "https://meta.localhost.localdomain";
           };
           user-invites = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               How many invites each user is issued upon registration
               (only applicable if open registration is disabled).
             '';
@@ -563,7 +563,7 @@ in
 
         options."pages.sr.ht" = commonServiceSettings "pages" // {
           gemini-certs = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               An absolute file path (which should be outside the Nix-store)
               to Gemini certificates.
             '';
@@ -571,12 +571,12 @@ in
             default = null;
           };
           max-site-size = mkOption {
-            description = lib.mdDoc "Maximum size of any given site (post-gunzip), in MiB.";
+            description = "Maximum size of any given site (post-gunzip), in MiB.";
             type = types.int;
             default = 1024;
           };
           user-domain = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Configures the user domain, if enabled.
               All users are given \<username\>.this.domain.
             '';
@@ -586,7 +586,7 @@ in
         };
         options."pages.sr.ht::api" = {
           internal-ipnet = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Set of IP subnets which are permitted to utilize internal API
               authentication. This should be limited to the subnets
               from which your *.sr.ht services are running.
@@ -602,24 +602,24 @@ in
 
         options."todo.sr.ht" = commonServiceSettings "todo" // {
           notify-from = mkOption {
-            description = lib.mdDoc "Outgoing email for notifications generated by users.";
+            description = "Outgoing email for notifications generated by users.";
             type = types.str;
             default = "todo-notify@localhost.localdomain";
           };
           webhooks = mkOption {
-            description = lib.mdDoc "The Redis connection used for the webhooks worker.";
+            description = "The Redis connection used for the webhooks worker.";
             type = types.str;
             default = "redis+socket:///run/redis-sourcehut-todosrht/redis.sock?virtual_host=1";
           };
         };
         options."todo.sr.ht::mail" = {
           posting-domain = mkOption {
-            description = lib.mdDoc "Posting domain.";
+            description = "Posting domain.";
             type = types.str;
             default = "todo.localhost.localdomain";
           };
           sock = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               Path for the lmtp daemon's unix socket. Direct incoming mail to this socket.
               Alternatively, specify IP:PORT and an SMTP server will be run instead.
             '';
@@ -627,7 +627,7 @@ in
             default = "/tmp/todo.sr.ht-lmtp.sock";
           };
           sock-group = mkOption {
-            description = lib.mdDoc ''
+            description = ''
               The lmtp daemon will make the unix socket group-read/write
               for users in this group.
             '';
@@ -637,13 +637,13 @@ in
         };
       };
       default = { };
-      description = lib.mdDoc ''
+      description = ''
         The configuration for the sourcehut network.
       '';
     };
 
     builds = {
-      enableWorker = mkEnableOption (lib.mdDoc ''
+      enableWorker = mkEnableOption ''
         worker for builds.sr.ht
 
         ::: {.warning}
@@ -653,7 +653,7 @@ in
         (e.g. automatic testing of patches via listssrht).
         See <https://man.sr.ht/builds.sr.ht/configuration.md#security-model>.
         :::
-      '');
+      '';
 
       images = mkOption {
         type = with types; attrsOf (attrsOf (attrsOf package));
@@ -673,7 +673,7 @@ in
             nixos.unstable.x86_64 = image_from_nixpkgs;
           }
         )'';
-        description = lib.mdDoc ''
+        description = ''
           Images for builds.sr.ht. Each package should be distro.release.arch and point to a /nix/store/package/root.img.qcow2.
         '';
       };
@@ -684,7 +684,7 @@ in
         example = "gitFull";
       };
       fcgiwrap.preforkProcess = mkOption {
-        description = lib.mdDoc "Number of fcgiwrap processes to prefork.";
+        description = "Number of fcgiwrap processes to prefork.";
         type = types.int;
         default = 4;
       };
@@ -695,7 +695,7 @@ in
       cloneBundles = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Generate clonebundles (which require more disk space but dramatically speed up cloning large repositories).
         '';
       };
@@ -706,12 +706,12 @@ in
         extraArgs = mkOption {
           type = with types; listOf str;
           default = [ "--loglevel DEBUG" "--pool eventlet" "--without-heartbeat" ];
-          description = lib.mdDoc "Extra arguments passed to the Celery responsible for processing mails.";
+          description = "Extra arguments passed to the Celery responsible for processing mails.";
         };
         celeryConfig = mkOption {
           type = types.lines;
           default = "";
-          description = lib.mdDoc "Content of the `celeryconfig.py` used by the Celery of `listssrht-process`.";
+          description = "Content of the `celeryconfig.py` used by the Celery of `listssrht-process`.";
         };
       };
     };
diff --git a/nixpkgs/nixos/modules/services/misc/sourcehut/service.nix b/nixpkgs/nixos/modules/services/misc/sourcehut/service.nix
index 4a8289b4d403..ce5a0e78627c 100644
--- a/nixpkgs/nixos/modules/services/misc/sourcehut/service.nix
+++ b/nixpkgs/nixos/modules/services/misc/sourcehut/service.nix
@@ -133,12 +133,12 @@ let
 in
 {
   options.services.sourcehut.${srv} = {
-    enable = mkEnableOption (lib.mdDoc "${srv} service");
+    enable = mkEnableOption "${srv} service";
 
     user = mkOption {
       type = types.str;
       default = srvsrht;
-      description = lib.mdDoc ''
+      description = ''
         User for ${srv}.sr.ht.
       '';
     };
@@ -146,7 +146,7 @@ in
     group = mkOption {
       type = types.str;
       default = srvsrht;
-      description = lib.mdDoc ''
+      description = ''
         Group for ${srv}.sr.ht.
         Membership grants access to the Git/Mercurial repositories by default,
         but not to the config.ini file (where secrets are).
@@ -156,7 +156,7 @@ in
     port = mkOption {
       type = types.port;
       default = port;
-      description = lib.mdDoc ''
+      description = ''
         Port on which the "${srv}" backend should listen.
       '';
     };
@@ -166,7 +166,7 @@ in
         type = types.str;
         default = "unix:///run/redis-sourcehut-${srvsrht}/redis.sock?db=0";
         example = "redis://shared.wireguard:6379/0";
-        description = lib.mdDoc ''
+        description = ''
           The redis host URL. This is used for caching and temporary storage, and must
           be shared between nodes (e.g. git1.sr.ht and git2.sr.ht), but need not be
           shared between services. It may be shared between services, however, with no
@@ -179,7 +179,7 @@ in
       database = mkOption {
         type = types.str;
         default = "${srv}.sr.ht";
-        description = lib.mdDoc ''
+        description = ''
           PostgreSQL database name for the ${srv}.sr.ht service,
           used if [](#opt-services.sourcehut.postgresql.enable) is `true`.
         '';
@@ -190,7 +190,7 @@ in
       extraArgs = mkOption {
         type = with types; listOf str;
         default = [ "--timeout 120" "--workers 1" "--log-level=info" ];
-        description = lib.mdDoc "Extra arguments passed to Gunicorn.";
+        description = "Extra arguments passed to Gunicorn.";
       };
     };
   } // optionalAttrs webhooks {
@@ -198,12 +198,12 @@ in
       extraArgs = mkOption {
         type = with types; listOf str;
         default = [ "--loglevel DEBUG" "--pool eventlet" "--without-heartbeat" ];
-        description = lib.mdDoc "Extra arguments passed to the Celery responsible for webhooks.";
+        description = "Extra arguments passed to the Celery responsible for webhooks.";
       };
       celeryConfig = mkOption {
         type = types.lines;
         default = "";
-        description = lib.mdDoc "Content of the `celeryconfig.py` used by the Celery responsible for webhooks.";
+        description = "Content of the `celeryconfig.py` used by the Celery responsible for webhooks.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/spice-autorandr.nix b/nixpkgs/nixos/modules/services/misc/spice-autorandr.nix
index 0d8830dbd5be..0d58d2865717 100644
--- a/nixpkgs/nixos/modules/services/misc/spice-autorandr.nix
+++ b/nixpkgs/nixos/modules/services/misc/spice-autorandr.nix
@@ -6,7 +6,7 @@ in
 {
   options = {
     services.spice-autorandr = {
-      enable = lib.mkEnableOption (lib.mdDoc "spice-autorandr service that will automatically resize display to match SPICE client window size.");
+      enable = lib.mkEnableOption "spice-autorandr service that will automatically resize display to match SPICE client window size.";
       package = lib.mkPackageOption pkgs "spice-autorandr" { };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/misc/spice-vdagentd.nix b/nixpkgs/nixos/modules/services/misc/spice-vdagentd.nix
index bde64847d89e..2dd9fcf68ab0 100644
--- a/nixpkgs/nixos/modules/services/misc/spice-vdagentd.nix
+++ b/nixpkgs/nixos/modules/services/misc/spice-vdagentd.nix
@@ -7,7 +7,7 @@ in
 {
   options = {
     services.spice-vdagentd = {
-      enable = mkEnableOption (lib.mdDoc "Spice guest vdagent daemon");
+      enable = mkEnableOption "Spice guest vdagent daemon";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/misc/spice-webdavd.nix b/nixpkgs/nixos/modules/services/misc/spice-webdavd.nix
index 2b4304365618..9df0f7a420e7 100644
--- a/nixpkgs/nixos/modules/services/misc/spice-webdavd.nix
+++ b/nixpkgs/nixos/modules/services/misc/spice-webdavd.nix
@@ -7,7 +7,7 @@ in
 {
   options = {
     services.spice-webdavd = {
-      enable = mkEnableOption (lib.mdDoc "the spice guest webdav proxy daemon");
+      enable = mkEnableOption "the spice guest webdav proxy daemon";
 
       package = mkPackageOption pkgs "phodav" { };
     };
diff --git a/nixpkgs/nixos/modules/services/misc/sssd.nix b/nixpkgs/nixos/modules/services/misc/sssd.nix
index f83c82bbb7d7..4429b20174d9 100644
--- a/nixpkgs/nixos/modules/services/misc/sssd.nix
+++ b/nixpkgs/nixos/modules/services/misc/sssd.nix
@@ -10,11 +10,11 @@ let
 in {
   options = {
     services.sssd = {
-      enable = mkEnableOption (lib.mdDoc "the System Security Services Daemon");
+      enable = mkEnableOption "the System Security Services Daemon";
 
       config = mkOption {
         type = types.lines;
-        description = lib.mdDoc "Contents of {file}`sssd.conf`.";
+        description = "Contents of {file}`sssd.conf`.";
         default = ''
           [sssd]
           config_file_version = 2
@@ -37,7 +37,7 @@ in {
       sshAuthorizedKeysIntegration = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to make sshd look up authorized keys from SSS.
           For this to work, the `ssh` SSS service must be enabled in the sssd configuration.
         '';
@@ -46,7 +46,7 @@ in {
       kcm = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to use SSS as a Kerberos Cache Manager (KCM).
           Kerberos will be configured to cache credentials in SSS.
         '';
@@ -54,7 +54,7 @@ in {
       environmentFile = mkOption {
         type = types.nullOr types.path;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           Environment file as defined in {manpage}`systemd.exec(5)`.
 
           Secrets may be passed to the service without adding them to the world-readable
diff --git a/nixpkgs/nixos/modules/services/misc/subsonic.nix b/nixpkgs/nixos/modules/services/misc/subsonic.nix
index 0862d5782595..2dda8970dd30 100644
--- a/nixpkgs/nixos/modules/services/misc/subsonic.nix
+++ b/nixpkgs/nixos/modules/services/misc/subsonic.nix
@@ -8,12 +8,12 @@ let
 in {
   options = {
     services.subsonic = {
-      enable = mkEnableOption (lib.mdDoc "Subsonic daemon");
+      enable = mkEnableOption "Subsonic daemon";
 
       home = mkOption {
         type = types.path;
         default = "/var/lib/subsonic";
-        description = lib.mdDoc ''
+        description = ''
           The directory where Subsonic will create files.
           Make sure it is writable.
         '';
@@ -22,7 +22,7 @@ in {
       listenAddress = mkOption {
         type = types.str;
         default = "0.0.0.0";
-        description = lib.mdDoc ''
+        description = ''
           The host name or IP address on which to bind Subsonic.
           Only relevant if you have multiple network interfaces and want
           to make Subsonic available on only one of them. The default value
@@ -33,7 +33,7 @@ in {
       port = mkOption {
         type = types.port;
         default = 4040;
-        description = lib.mdDoc ''
+        description = ''
           The port on which Subsonic will listen for
           incoming HTTP traffic. Set to 0 to disable.
         '';
@@ -42,7 +42,7 @@ in {
       httpsPort = mkOption {
         type = types.port;
         default = 0;
-        description = lib.mdDoc ''
+        description = ''
           The port on which Subsonic will listen for
           incoming HTTPS traffic. Set to 0 to disable.
         '';
@@ -51,7 +51,7 @@ in {
       contextPath = mkOption {
         type = types.path;
         default = "/";
-        description = lib.mdDoc ''
+        description = ''
           The context path, i.e., the last part of the Subsonic
           URL. Typically '/' or '/subsonic'. Default '/'
         '';
@@ -60,7 +60,7 @@ in {
       maxMemory = mkOption {
         type = types.int;
         default = 100;
-        description = lib.mdDoc ''
+        description = ''
           The memory limit (max Java heap size) in megabytes.
           Default: 100
         '';
@@ -69,7 +69,7 @@ in {
       defaultMusicFolder = mkOption {
         type = types.path;
         default = "/var/music";
-        description = lib.mdDoc ''
+        description = ''
           Configure Subsonic to use this folder for music.  This option
           only has effect the first time Subsonic is started.
         '';
@@ -78,7 +78,7 @@ in {
       defaultPodcastFolder = mkOption {
         type = types.path;
         default = "/var/music/Podcast";
-        description = lib.mdDoc ''
+        description = ''
           Configure Subsonic to use this folder for Podcasts.  This option
           only has effect the first time Subsonic is started.
         '';
@@ -87,7 +87,7 @@ in {
       defaultPlaylistFolder = mkOption {
         type = types.path;
         default = "/var/playlists";
-        description = lib.mdDoc ''
+        description = ''
           Configure Subsonic to use this folder for playlists.  This option
           only has effect the first time Subsonic is started.
         '';
@@ -97,7 +97,7 @@ in {
         type = types.listOf types.path;
         default = [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
         defaultText = literalExpression ''[ "''${pkgs.ffmpeg.bin}/bin/ffmpeg" ]'';
-        description = lib.mdDoc ''
+        description = ''
           List of paths to transcoder executables that should be accessible
           from Subsonic. Symlinks will be created to each executable inside
           ''${config.${opt.home}}/transcoders.
diff --git a/nixpkgs/nixos/modules/services/misc/sundtek.nix b/nixpkgs/nixos/modules/services/misc/sundtek.nix
index e85d7c5b92b9..e3234518c940 100644
--- a/nixpkgs/nixos/modules/services/misc/sundtek.nix
+++ b/nixpkgs/nixos/modules/services/misc/sundtek.nix
@@ -8,7 +8,7 @@ let
 in
 {
   options.services.sundtek = {
-    enable = mkEnableOption (lib.mdDoc "Sundtek driver");
+    enable = mkEnableOption "Sundtek driver";
   };
 
   config = mkIf cfg.enable {
diff --git a/nixpkgs/nixos/modules/services/misc/svnserve.nix b/nixpkgs/nixos/modules/services/misc/svnserve.nix
index a0103641c650..5fa262ca3b94 100644
--- a/nixpkgs/nixos/modules/services/misc/svnserve.nix
+++ b/nixpkgs/nixos/modules/services/misc/svnserve.nix
@@ -20,13 +20,13 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to enable svnserve to serve Subversion repositories through the SVN protocol.";
+        description = "Whether to enable svnserve to serve Subversion repositories through the SVN protocol.";
       };
 
       svnBaseDir = mkOption {
         type = types.str;
         default = "/repos";
-        description = lib.mdDoc "Base directory from which Subversion repositories are accessed.";
+        description = "Base directory from which Subversion repositories are accessed.";
       };
     };
 
diff --git a/nixpkgs/nixos/modules/services/misc/synergy.nix b/nixpkgs/nixos/modules/services/misc/synergy.nix
index 0cbdc7599c0f..fb664fc071d1 100644
--- a/nixpkgs/nixos/modules/services/misc/synergy.nix
+++ b/nixpkgs/nixos/modules/services/misc/synergy.nix
@@ -19,19 +19,19 @@ in
       # !!! All these option descriptions needs to be cleaned up.
 
       client = {
-        enable = mkEnableOption (lib.mdDoc "the Synergy client (receive keyboard and mouse events from a Synergy server)");
+        enable = mkEnableOption "the Synergy client (receive keyboard and mouse events from a Synergy server)";
 
         screenName = mkOption {
           default = "";
           type = types.str;
-          description = lib.mdDoc ''
+          description = ''
             Use the given name instead of the hostname to identify
             ourselves to the server.
           '';
         };
         serverAddress = mkOption {
           type = types.str;
-          description = lib.mdDoc ''
+          description = ''
             The server address is of the form: [hostname][:port].  The
             hostname must be the address or hostname of the server.  The
             port overrides the default port, 24800.
@@ -40,22 +40,22 @@ in
         autoStart = mkOption {
           default = true;
           type = types.bool;
-          description = lib.mdDoc "Whether the Synergy client should be started automatically.";
+          description = "Whether the Synergy client should be started automatically.";
         };
       };
 
       server = {
-        enable = mkEnableOption (lib.mdDoc "the Synergy server (send keyboard and mouse events)");
+        enable = mkEnableOption "the Synergy server (send keyboard and mouse events)";
 
         configFile = mkOption {
           type = types.path;
           default = "/etc/synergy-server.conf";
-          description = lib.mdDoc "The Synergy server configuration file.";
+          description = "The Synergy server configuration file.";
         };
         screenName = mkOption {
           type = types.str;
           default = "";
-          description = lib.mdDoc ''
+          description = ''
             Use the given name instead of the hostname to identify
             this screen in the configuration.
           '';
@@ -63,18 +63,18 @@ in
         address = mkOption {
           type = types.str;
           default = "";
-          description = lib.mdDoc "Address on which to listen for clients.";
+          description = "Address on which to listen for clients.";
         };
         autoStart = mkOption {
           default = true;
           type = types.bool;
-          description = lib.mdDoc "Whether the Synergy server should be started automatically.";
+          description = "Whether the Synergy server should be started automatically.";
         };
         tls = {
           enable = mkOption {
             type = types.bool;
             default = false;
-            description = lib.mdDoc ''
+            description = ''
               Whether TLS encryption should be used.
 
               Using this requires a TLS certificate that can be
@@ -87,7 +87,7 @@ in
             type = types.nullOr types.str;
             default = null;
             example = "~/.synergy/SSL/Synergy.pem";
-            description = lib.mdDoc "The TLS certificate to use for encryption.";
+            description = "The TLS certificate to use for encryption.";
           };
         };
       };
diff --git a/nixpkgs/nixos/modules/services/misc/sysprof.nix b/nixpkgs/nixos/modules/services/misc/sysprof.nix
index 25c5b0fabf61..ab91a8b586a2 100644
--- a/nixpkgs/nixos/modules/services/misc/sysprof.nix
+++ b/nixpkgs/nixos/modules/services/misc/sysprof.nix
@@ -3,7 +3,7 @@
 {
   options = {
     services.sysprof = {
-      enable = lib.mkEnableOption (lib.mdDoc "sysprof profiling daemon");
+      enable = lib.mkEnableOption "sysprof profiling daemon";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/misc/tabby.nix b/nixpkgs/nixos/modules/services/misc/tabby.nix
index a3072e5df75e..d63a6b24ae3d 100644
--- a/nixpkgs/nixos/modules/services/misc/tabby.nix
+++ b/nixpkgs/nixos/modules/services/misc/tabby.nix
@@ -11,16 +11,14 @@ in
 {
   options = {
     services.tabby = {
-      enable = lib.mkEnableOption (
-        lib.mdDoc "Self-hosted AI coding assistant using large language models"
-      );
+      enable = lib.mkEnableOption "Self-hosted AI coding assistant using large language models";
 
       package = lib.mkPackageOption pkgs "tabby" { };
 
       port = lib.mkOption {
         type = types.port;
         default = 11029;
-        description = lib.mdDoc ''
+        description = ''
           Specifies the bind port on which the tabby server HTTP interface listens.
         '';
       };
@@ -28,7 +26,7 @@ in
       model = lib.mkOption {
         type = types.str;
         default = "TabbyML/StarCoder-1B";
-        description = lib.mdDoc ''
+        description = ''
           Specify the model that tabby will use to generate completions.
 
           This model will be downloaded automatically if it is not already present.
@@ -60,7 +58,7 @@ in
         type = types.nullOr (types.enum [ "cpu" "rocm" "cuda" "metal" ]);
         default = null;
         example = "rocm";
-        description = lib.mdDoc ''
+        description = ''
           Specifies the device to use for hardware acceleration.
 
           -   `cpu`: no acceleration just use the CPU
@@ -85,7 +83,7 @@ in
       settings = lib.mkOption {
         inherit (format) type;
         default = { };
-        description = lib.mdDoc ''
+        description = ''
           Tabby scheduler configuration
 
           See for more details:
@@ -108,7 +106,7 @@ in
       usageCollection = lib.mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Enable sending anonymous usage data.
 
           See for more details:
@@ -120,7 +118,7 @@ in
         type = types.str;
         default = "5hours";
         example = "5hours";
-        description = lib.mdDoc ''
+        description = ''
           Run tabby scheduler to generate the index database at this interval.
           Updates by default every 5 hours. This value applies to
           `OnUnitInactiveSec`
diff --git a/nixpkgs/nixos/modules/services/misc/tandoor-recipes.nix b/nixpkgs/nixos/modules/services/misc/tandoor-recipes.nix
index 1b1fde78ad0a..a2210f3d7db5 100644
--- a/nixpkgs/nixos/modules/services/misc/tandoor-recipes.nix
+++ b/nixpkgs/nixos/modules/services/misc/tandoor-recipes.nix
@@ -33,7 +33,7 @@ in
     enable = mkOption {
       type = lib.types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Enable Tandoor Recipes.
 
         When started, the Tandoor Recipes database is automatically created if
@@ -48,19 +48,19 @@ in
     address = mkOption {
       type = types.str;
       default = "localhost";
-      description = lib.mdDoc "Web interface address.";
+      description = "Web interface address.";
     };
 
     port = mkOption {
       type = types.port;
       default = 8080;
-      description = lib.mdDoc "Web interface port.";
+      description = "Web interface port.";
     };
 
     extraConfig = mkOption {
       type = types.attrs;
       default = { };
-      description = lib.mdDoc ''
+      description = ''
         Extra tandoor recipes config options.
 
         See [the example dot-env file](https://raw.githubusercontent.com/vabene1111/recipes/master/.env.template)
diff --git a/nixpkgs/nixos/modules/services/misc/taskserver/default.nix b/nixpkgs/nixos/modules/services/misc/taskserver/default.nix
index 775b3b6d2eae..d359bf899768 100644
--- a/nixpkgs/nixos/modules/services/misc/taskserver/default.nix
+++ b/nixpkgs/nixos/modules/services/misc/taskserver/default.nix
@@ -10,7 +10,7 @@ let
   mkManualPkiOption = desc: mkOption {
     type = types.nullOr types.path;
     default = null;
-    description = lib.mdDoc ''
+    description = ''
       ${desc}
 
       ::: {.note}
@@ -37,7 +37,7 @@ let
     '';
   };
 
-  mkAutoDesc = preamble: lib.mdDoc ''
+  mkAutoDesc = preamble: ''
     ${preamble}
 
     ::: {.note}
@@ -91,7 +91,7 @@ let
       type = types.uniq (types.listOf types.str);
       default = [];
       example = [ "alice" "bob" ];
-      description = lib.mdDoc ''
+      description = ''
         A list of user names that belong to the organization.
       '';
     };
@@ -100,7 +100,7 @@ let
       type = types.listOf types.str;
       default = [];
       example = [ "workers" "slackers" ];
-      description = lib.mdDoc ''
+      description = ''
         A list of group names that belong to the organization.
       '';
     };
@@ -142,7 +142,7 @@ in {
         default = false;
         description = let
           url = "https://nixos.org/manual/nixos/stable/index.html#module-services-taskserver";
-        in lib.mdDoc ''
+        in ''
           Whether to enable the Taskwarrior server.
 
           More instructions about NixOS in conjunction with Taskserver can be
@@ -153,19 +153,19 @@ in {
       user = mkOption {
         type = types.str;
         default = "taskd";
-        description = lib.mdDoc "User for Taskserver.";
+        description = "User for Taskserver.";
       };
 
       group = mkOption {
         type = types.str;
         default = "taskd";
-        description = lib.mdDoc "Group for Taskserver.";
+        description = "Group for Taskserver.";
       };
 
       dataDir = mkOption {
         type = types.path;
         default = "/var/lib/taskserver";
-        description = lib.mdDoc "Data directory for Taskserver.";
+        description = "Data directory for Taskserver.";
       };
 
       ciphers = mkOption {
@@ -174,7 +174,7 @@ in {
         example = "NORMAL:-VERS-SSL3.0";
         description = let
           url = "https://gnutls.org/manual/html_node/Priority-Strings.html";
-        in lib.mdDoc ''
+        in ''
           List of GnuTLS ciphers to use. See the GnuTLS documentation about
           priority strings at <${url}> for full details.
         '';
@@ -186,7 +186,7 @@ in {
         example.myShinyOrganisation.users = [ "alice" "bob" ];
         example.myShinyOrganisation.groups = [ "staff" "outsiders" ];
         example.yetAnotherOrganisation.users = [ "foo" "bar" ];
-        description = lib.mdDoc ''
+        description = ''
           An attribute set where the keys name the organisation and the values
           are a set of lists of {option}`users` and
           {option}`groups`.
@@ -196,7 +196,7 @@ in {
       confirmation = mkOption {
         type = types.bool;
         default = true;
-        description = lib.mdDoc ''
+        description = ''
           Determines whether certain commands are confirmed.
         '';
       };
@@ -204,7 +204,7 @@ in {
       debug = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Logs debugging information.
         '';
       };
@@ -212,7 +212,7 @@ in {
       extensions = mkOption {
         type = types.nullOr types.path;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           Fully qualified path of the Taskserver extension scripts.
           Currently there are none.
         '';
@@ -221,7 +221,7 @@ in {
       ipLog = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Logs the IP addresses of incoming requests.
         '';
       };
@@ -229,7 +229,7 @@ in {
       queueSize = mkOption {
         type = types.int;
         default = 10;
-        description = lib.mdDoc ''
+        description = ''
           Size of the connection backlog, see {manpage}`listen(2)`.
         '';
       };
@@ -237,7 +237,7 @@ in {
       requestLimit = mkOption {
         type = types.int;
         default = 1048576;
-        description = lib.mdDoc ''
+        description = ''
           Size limit of incoming requests, in bytes.
         '';
       };
@@ -246,7 +246,7 @@ in {
         type = with types; either str (listOf str);
         default = [];
         example = [ "[Tt]ask [2-9]+" ];
-        description = lib.mdDoc ''
+        description = ''
           A list of regular expressions that are matched against the reported
           client id (such as `task 2.3.0`).
 
@@ -260,7 +260,7 @@ in {
         type = with types; either str (listOf str);
         default = [];
         example = [ "[Tt]ask [2-9]+" ];
-        description = lib.mdDoc ''
+        description = ''
           A list of regular expressions that are matched against the reported
           client id (such as `task 2.3.0`).
 
@@ -274,7 +274,7 @@ in {
         type = types.str;
         default = "localhost";
         example = "::";
-        description = lib.mdDoc ''
+        description = ''
           The address (IPv4, IPv6 or DNS) to listen on.
         '';
       };
@@ -282,7 +282,7 @@ in {
       listenPort = mkOption {
         type = types.int;
         default = 53589;
-        description = lib.mdDoc ''
+        description = ''
           Port number of the Taskserver.
         '';
       };
@@ -290,7 +290,7 @@ in {
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to open the firewall for the specified Taskserver port.
         '';
       };
@@ -298,7 +298,7 @@ in {
       fqdn = mkOption {
         type = types.str;
         default = "localhost";
-        description = lib.mdDoc ''
+        description = ''
           The fully qualified domain name of this server, which is also used
           as the common name in the certificates.
         '';
@@ -307,7 +307,7 @@ in {
       trust = mkOption {
         type = types.enum [ "allow all" "strict" ];
         default = "strict";
-        description = lib.mdDoc ''
+        description = ''
           Determines how client certificates are validated.
 
           The value `allow all` performs no client
@@ -323,7 +323,7 @@ in {
       config = mkOption {
         type = types.attrs;
         example.client.cert = "/tmp/debugging.cert";
-        description = lib.mdDoc ''
+        description = ''
           Configuration options to pass to Taskserver.
 
           The options here are the same as described in
diff --git a/nixpkgs/nixos/modules/services/misc/tautulli.nix b/nixpkgs/nixos/modules/services/misc/tautulli.nix
index e379628c8ce6..6afdbd212aa8 100644
--- a/nixpkgs/nixos/modules/services/misc/tautulli.nix
+++ b/nixpkgs/nixos/modules/services/misc/tautulli.nix
@@ -12,42 +12,42 @@ in
 
   options = {
     services.tautulli = {
-      enable = mkEnableOption (lib.mdDoc "Tautulli Plex Monitor");
+      enable = mkEnableOption "Tautulli Plex Monitor";
 
       dataDir = mkOption {
         type = types.str;
         default = "/var/lib/plexpy";
-        description = lib.mdDoc "The directory where Tautulli stores its data files.";
+        description = "The directory where Tautulli stores its data files.";
       };
 
       configFile = mkOption {
         type = types.str;
         default = "/var/lib/plexpy/config.ini";
-        description = lib.mdDoc "The location of Tautulli's config file.";
+        description = "The location of Tautulli's config file.";
       };
 
       port = mkOption {
         type = types.port;
         default = 8181;
-        description = lib.mdDoc "TCP port where Tautulli listens.";
+        description = "TCP port where Tautulli listens.";
       };
 
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Open ports in the firewall for Tautulli.";
+        description = "Open ports in the firewall for Tautulli.";
       };
 
       user = mkOption {
         type = types.str;
         default = "plexpy";
-        description = lib.mdDoc "User account under which Tautulli runs.";
+        description = "User account under which Tautulli runs.";
       };
 
       group = mkOption {
         type = types.str;
         default = "nogroup";
-        description = lib.mdDoc "Group under which Tautulli runs.";
+        description = "Group under which Tautulli runs.";
       };
 
       package = mkPackageOption pkgs "tautulli" { };
diff --git a/nixpkgs/nixos/modules/services/misc/tiddlywiki.nix b/nixpkgs/nixos/modules/services/misc/tiddlywiki.nix
index 849f53ca2d48..7ae657dd862d 100644
--- a/nixpkgs/nixos/modules/services/misc/tiddlywiki.nix
+++ b/nixpkgs/nixos/modules/services/misc/tiddlywiki.nix
@@ -14,7 +14,7 @@ in {
 
   options.services.tiddlywiki = {
 
-    enable = mkEnableOption (lib.mdDoc "TiddlyWiki nodejs server");
+    enable = mkEnableOption "TiddlyWiki nodejs server";
 
     listenOptions = mkOption {
       type = types.attrs;
@@ -24,7 +24,7 @@ in {
         readers="(authenticated)";
         port = 3456;
       };
-      description = lib.mdDoc ''
+      description = ''
         Parameters passed to `--listen` command.
         Refer to <https://tiddlywiki.com/#WebServer>
         for details on supported values.
diff --git a/nixpkgs/nixos/modules/services/misc/tp-auto-kbbl.nix b/nixpkgs/nixos/modules/services/misc/tp-auto-kbbl.nix
index f6f2d49733e6..4ea356a133d8 100644
--- a/nixpkgs/nixos/modules/services/misc/tp-auto-kbbl.nix
+++ b/nixpkgs/nixos/modules/services/misc/tp-auto-kbbl.nix
@@ -9,14 +9,14 @@ in {
 
   options = {
     services.tp-auto-kbbl = {
-      enable = mkEnableOption (lib.mdDoc "auto toggle keyboard back-lighting on Thinkpads (and maybe other laptops) for Linux");
+      enable = mkEnableOption "auto toggle keyboard back-lighting on Thinkpads (and maybe other laptops) for Linux";
 
       package = mkPackageOption pkgs "tp-auto-kbbl" { };
 
       arguments = mkOption {
         type = types.listOf types.str;
         default = [ ];
-        description = lib.mdDoc ''
+        description = ''
           List of arguments appended to `./tp-auto-kbbl --device [device] [arguments]`
         '';
       };
@@ -24,7 +24,7 @@ in {
       device = mkOption {
         type = types.str;
         default = "/dev/input/event0";
-        description = lib.mdDoc "Device watched for activities.";
+        description = "Device watched for activities.";
       };
 
     };
diff --git a/nixpkgs/nixos/modules/services/misc/transfer-sh.nix b/nixpkgs/nixos/modules/services/misc/transfer-sh.nix
index 899d9dfc3c10..150af2337e14 100644
--- a/nixpkgs/nixos/modules/services/misc/transfer-sh.nix
+++ b/nixpkgs/nixos/modules/services/misc/transfer-sh.nix
@@ -4,11 +4,11 @@ let
   cfg = config.services.transfer-sh;
   inherit (lib)
     mkDefault mkEnableOption mkPackageOption mkIf mkOption
-    types mapAttrs isBool getExe boolToString mdDoc optionalAttrs;
+    types mapAttrs isBool getExe boolToString optionalAttrs;
 in
 {
   options.services.transfer-sh = {
-    enable = mkEnableOption (mdDoc "Easy and fast file sharing from the command-line");
+    enable = mkEnableOption "Easy and fast file sharing from the command-line";
 
     package = mkPackageOption pkgs "transfer-sh" { };
 
@@ -20,7 +20,7 @@ in
         BASEDIR = "/var/lib/transfer.sh";
         TLS_LISTENER_ONLY = false;
       };
-      description = mdDoc ''
+      description = ''
         Additional configuration for transfer-sh, see
         <https://github.com/dutchcoders/transfer.sh#usage-1>
         for supported values.
@@ -32,14 +32,14 @@ in
     provider = mkOption {
       type = types.enum [ "local" "s3" "storj" "gdrive" ];
       default = "local";
-      description = mdDoc "Storage providers to use";
+      description = "Storage providers to use";
     };
 
     secretFile = mkOption {
       type = types.nullOr types.path;
       default = null;
       example = "/run/secrets/transfer-sh.env";
-      description = mdDoc ''
+      description = ''
         Path to file containing environment variables.
         Useful for passing down secrets.
         Some variables that can be considered secrets are:
diff --git a/nixpkgs/nixos/modules/services/misc/tuxclocker.nix b/nixpkgs/nixos/modules/services/misc/tuxclocker.nix
index 5969f75b8e30..4c2f9e39bcfc 100644
--- a/nixpkgs/nixos/modules/services/misc/tuxclocker.nix
+++ b/nixpkgs/nixos/modules/services/misc/tuxclocker.nix
@@ -7,20 +7,20 @@ let
 in
 {
   options.programs.tuxclocker = {
-    enable = mkEnableOption (lib.mdDoc ''
+    enable = mkEnableOption ''
       TuxClocker, a hardware control and monitoring program
-    '');
+    '';
 
-    enableAMD = mkEnableOption (lib.mdDoc ''
+    enableAMD = mkEnableOption ''
       AMD GPU controls.
       Sets the `amdgpu.ppfeaturemask` kernel parameter to 0xfffd7fff to enable all TuxClocker controls
-    '');
+    '';
 
     enabledNVIDIADevices = mkOption {
       type = types.listOf types.int;
       default = [ ];
       example = [ 0 1 ];
-      description = lib.mdDoc ''
+      description = ''
         Enable NVIDIA GPU controls for a device by index.
         Sets the `Coolbits` Xorg option to enable all TuxClocker controls.
       '';
@@ -30,7 +30,7 @@ in
       type = types.bool;
       default = false;
       example = true;
-      description = lib.mdDoc ''
+      description = ''
         Whether to use components requiring unfree dependencies.
         Disabling this allows you to get everything from the binary cache.
       '';
diff --git a/nixpkgs/nixos/modules/services/misc/tzupdate.nix b/nixpkgs/nixos/modules/services/misc/tzupdate.nix
index 300a578f7c4a..eac1e1112a5a 100644
--- a/nixpkgs/nixos/modules/services/misc/tzupdate.nix
+++ b/nixpkgs/nixos/modules/services/misc/tzupdate.nix
@@ -9,7 +9,7 @@ in {
     enable = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Enable the tzupdate timezone updating service. This provides
         a one-shot service which can be activated with systemctl to
         update the timezone.
diff --git a/nixpkgs/nixos/modules/services/misc/uhub.nix b/nixpkgs/nixos/modules/services/misc/uhub.nix
index 80266b024e35..99774fbb920a 100644
--- a/nixpkgs/nixos/modules/services/misc/uhub.nix
+++ b/nixpkgs/nixos/modules/services/misc/uhub.nix
@@ -15,21 +15,21 @@ in {
 
     services.uhub = mkOption {
       default = { };
-      description = lib.mdDoc "Uhub ADC hub instances";
+      description = "Uhub ADC hub instances";
       type = types.attrsOf (types.submodule {
         options = {
 
-          enable = mkEnableOption (lib.mdDoc "hub instance") // { default = true; };
+          enable = mkEnableOption "hub instance" // { default = true; };
 
           enableTLS = mkOption {
             type = types.bool;
             default = false;
-            description = lib.mdDoc "Whether to enable TLS support.";
+            description = "Whether to enable TLS support.";
           };
 
           settings = mkOption {
             inherit (settingsFormat) type;
-            description = lib.mdDoc ''
+            description = ''
               Configuration of uhub.
               See https://www.uhub.org/doc/config.php for a list of options.
             '';
@@ -44,7 +44,7 @@ in {
           };
 
           plugins = mkOption {
-            description = lib.mdDoc "Uhub plugin configuration.";
+            description = "Uhub plugin configuration.";
             type = with types;
               listOf (submodule {
                 options = {
@@ -52,10 +52,10 @@ in {
                     type = path;
                     example = literalExpression
                       "$${pkgs.uhub}/plugins/mod_auth_sqlite.so";
-                    description = lib.mdDoc "Path to plugin file.";
+                    description = "Path to plugin file.";
                   };
                   settings = mkOption {
-                    description = lib.mdDoc "Settings specific to this plugin.";
+                    description = "Settings specific to this plugin.";
                     type = with types; attrsOf str;
                     example = { file = "/etc/uhub/users.db"; };
                   };
diff --git a/nixpkgs/nixos/modules/services/misc/wastebin.nix b/nixpkgs/nixos/modules/services/misc/wastebin.nix
new file mode 100644
index 000000000000..3d0af2862683
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/misc/wastebin.nix
@@ -0,0 +1,158 @@
+{ config, lib, pkgs, ... }:
+
+let
+  cfg = config.services.wastebin;
+  inherit (lib)
+    mkEnableOption mkPackageOption mkIf mkOption
+    types mapAttrs isBool getExe boolToString optionalAttrs;
+in
+{
+
+  options.services.wastebin = {
+
+    enable = mkEnableOption "Wastenbin pastebin service";
+
+    package = mkPackageOption pkgs "wastebin" { };
+
+    stateDir = mkOption {
+      type = types.path;
+      default = "/var/lib/wastebin";
+      description = "State directory of the daemon.";
+    };
+
+    secretFile = mkOption {
+      type = types.nullOr types.path;
+      default = null;
+      example = "/run/secrets/wastebin.env";
+      description = ''
+        Path to file containing sensitive environment variables.
+        Some variables that can be considered secrets are:
+
+        - WASTEBIN_PASSWORD_SALT:
+          salt used to hash user passwords used for encrypting pastes.
+
+        - WASTEBIN_SIGNING_KEY:
+          sets the key to sign cookies. If not set, a random key will be
+          generated which means cookies will become invalid after restarts and
+          paste creators will not be able to delete their pastes anymore.
+      '';
+    };
+
+    settings = mkOption {
+
+      description = ''
+        Additional configuration for wastebin, see
+        <https://github.com/matze/wastebin#usage> for supported values.
+        For secrets use secretFile option instead.
+      '';
+
+      type = types.submodule {
+
+        freeformType = with types; attrsOf (oneOf [ bool int str ]);
+
+        options = {
+
+          WASTEBIN_ADDRESS_PORT = mkOption {
+            type = types.str;
+            default = "0.0.0.0:8088";
+            description = "Address and port to bind to";
+          };
+
+          WASTEBIN_BASE_URL = mkOption {
+            default = "http://localhost";
+            example = "https://myhost.tld";
+            type = types.str;
+            description = ''
+              Base URL for the QR code display. If not set, the user agent's Host
+              header field is used as an approximation.
+            '';
+          };
+
+          WASTEBIN_CACHE_SIZE = mkOption {
+            default = 128;
+            type = types.int;
+            description = "Number of rendered syntax highlight items to cache. Can be disabled by setting to 0.";
+          };
+
+          WASTEBIN_DATABASE_PATH = mkOption {
+            default = "/var/lib/wastebin/sqlite3.db"; # TODO make this default to stateDir/sqlite3.db
+            type = types.str;
+            description = "Path to the sqlite3 database file. If not set, an in-memory database is used.";
+          };
+
+          WASTEBIN_HTTP_TIMEOUT = mkOption {
+            default = 5;
+            type = types.int;
+            description = "Maximum number of seconds a request can be processed until wastebin responds with 408";
+          };
+
+          WASTEBIN_MAX_BODY_SIZE = mkOption {
+            default = 1024;
+            type = types.int;
+            description = "Number of bytes to accept for POST requests";
+          };
+
+          WASTEBIN_TITLE = mkOption {
+            default = "wastebin";
+            type = types.str;
+            description = "Overrides the HTML page title";
+          };
+
+          RUST_LOG = mkOption {
+            default = "info";
+            type = types.str;
+            description =
+              ''
+                Influences logging. Besides the typical trace, debug, info etc.
+                keys, you can also set the tower_http key to some log level to get
+                additional information request and response logs.
+              '';
+          };
+        };
+      };
+
+      default = { };
+
+      example = {
+        WASTEBIN_TITLE = "My awesome pastebin";
+      };
+    };
+  };
+
+  config = mkIf cfg.enable
+    {
+      systemd.services.wastebin = {
+        after = [ "network.target" ];
+        wantedBy = [ "multi-user.target" ];
+        environment = mapAttrs (_: v: if isBool v then boolToString v else toString v) cfg.settings;
+        serviceConfig = {
+          CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
+          DevicePolicy = "closed";
+          DynamicUser = true;
+          ExecStart = "${getExe cfg.package}";
+          LockPersonality = true;
+          MemoryDenyWriteExecute = true;
+          PrivateDevices = true;
+          PrivateUsers = true;
+          ProtectClock = true;
+          ProtectControlGroups = true;
+          ProtectHostname = true;
+          ProtectKernelLogs = true;
+          ProtectKernelModules = true;
+          ProtectKernelTunables = true;
+          ProtectProc = "invisible";
+          RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
+          RestrictNamespaces = true;
+          RestrictRealtime = true;
+          SystemCallArchitectures = [ "native" ];
+          SystemCallFilter = [ "@system-service" ];
+          StateDirectory = baseNameOf cfg.stateDir;
+          ReadWritePaths = cfg.stateDir;
+        } // optionalAttrs (cfg.secretFile != null) {
+          EnvironmentFile = cfg.secretFile;
+        };
+      };
+    };
+
+  meta.maintainers = with lib.maintainers; [ pinpox ];
+}
diff --git a/nixpkgs/nixos/modules/services/misc/weechat.nix b/nixpkgs/nixos/modules/services/misc/weechat.nix
index 338493e3cd37..6f6c78b1c9dc 100644
--- a/nixpkgs/nixos/modules/services/misc/weechat.nix
+++ b/nixpkgs/nixos/modules/services/misc/weechat.nix
@@ -8,20 +8,20 @@ in
 
 {
   options.services.weechat = {
-    enable = mkEnableOption (lib.mdDoc "weechat");
+    enable = mkEnableOption "weechat";
     root = mkOption {
-      description = lib.mdDoc "Weechat state directory.";
+      description = "Weechat state directory.";
       type = types.str;
       default = "/var/lib/weechat";
     };
     sessionName = mkOption {
-      description = lib.mdDoc "Name of the `screen` session for weechat.";
+      description = "Name of the `screen` session for weechat.";
       default = "weechat-screen";
       type = types.str;
     };
     binary = mkOption {
       type = types.path;
-      description = lib.mdDoc "Binary to execute.";
+      description = "Binary to execute.";
       default = "${pkgs.weechat}/bin/weechat";
       defaultText = literalExpression ''"''${pkgs.weechat}/bin/weechat"'';
       example = literalExpression ''"''${pkgs.weechat}/bin/weechat-headless"'';
diff --git a/nixpkgs/nixos/modules/services/misc/workout-tracker.nix b/nixpkgs/nixos/modules/services/misc/workout-tracker.nix
new file mode 100644
index 000000000000..13555504be30
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/misc/workout-tracker.nix
@@ -0,0 +1,83 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}:
+
+let
+  inherit (lib) types;
+  cfg = config.services.workout-tracker;
+  stateDir = "workout-tracker";
+in
+
+{
+  options = {
+    services.workout-tracker = {
+      enable = lib.mkEnableOption "workout tracking web application for personal use (or family, friends), geared towards running and other GPX-based activities";
+
+      package = lib.mkPackageOption pkgs "workout-tracker" { };
+
+      address = lib.mkOption {
+        type = types.str;
+        default = "127.0.0.1";
+        description = "Web interface address.";
+      };
+
+      port = lib.mkOption {
+        type = types.port;
+        default = 8080;
+        description = "Web interface port.";
+      };
+
+      environmentFile = lib.mkOption {
+        type = types.nullOr types.path;
+        default = null;
+        example = "/run/keys/workout-tracker.env";
+        description = ''
+          An environment file as defined in {manpage}`systemd.exec(5)`.
+
+          Secrets like `WT_JWT_ENCRYPTION_KEY` may be passed to the service without adding them
+          to the world-readable Nix store.
+        '';
+      };
+
+      settings = lib.mkOption {
+        type = types.attrsOf types.str;
+
+        default = { };
+        description = ''
+          Extra config options.
+        '';
+        example = {
+          WT_LOGGING = "true";
+          WT_DEBUG = "false";
+          WT_DATABASE_DRIVER = "sqlite";
+          WT_DSN = "./database.db";
+        };
+      };
+    };
+  };
+
+  config = lib.mkIf cfg.enable {
+    systemd.services.workout-tracker = {
+      description = "A workout tracking web application for personal use (or family, friends), geared towards running and other GPX-based activities";
+      wantedBy = [ "multi-user.target" ];
+      environment = {
+        WT_BIND = "${cfg.address}:${toString cfg.port}";
+        WT_DATABASE_DRIVER = "sqlite";
+        WT_DSN = "./database.db";
+      } // cfg.settings;
+      serviceConfig = {
+        ExecStart = lib.getExe cfg.package;
+        DynamicUser = true;
+        StateDirectory = stateDir;
+        WorkingDirectory = "%S/${stateDir}";
+        Restart = "always";
+        EnvironmentFile = lib.optional (cfg.environmentFile != null) cfg.environmentFile;
+      };
+    };
+  };
+
+  meta.maintainers = with lib.maintainers; [ bhankas ];
+}
diff --git a/nixpkgs/nixos/modules/services/misc/xmr-stak.nix b/nixpkgs/nixos/modules/services/misc/xmr-stak.nix
index 54efae48d5d2..3015e3cb12a8 100644
--- a/nixpkgs/nixos/modules/services/misc/xmr-stak.nix
+++ b/nixpkgs/nixos/modules/services/misc/xmr-stak.nix
@@ -15,14 +15,14 @@ in
 {
   options = {
     services.xmr-stak = {
-      enable = mkEnableOption (lib.mdDoc "xmr-stak miner");
-      openclSupport = mkEnableOption (lib.mdDoc "support for OpenCL (AMD/ATI graphics cards)");
+      enable = mkEnableOption "xmr-stak miner";
+      openclSupport = mkEnableOption "support for OpenCL (AMD/ATI graphics cards)";
 
       extraArgs = mkOption {
         type = types.listOf types.str;
         default = [];
         example = [ "--noCPU" "--currency monero" ];
-        description = lib.mdDoc "List of parameters to pass to xmr-stak.";
+        description = "List of parameters to pass to xmr-stak.";
       };
 
       configFiles = mkOption {
@@ -51,7 +51,7 @@ in
             ''';
           }
         '';
-        description = lib.mdDoc ''
+        description = ''
           Content of config files like config.txt, pools.txt or cpu.txt.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/xmrig.nix b/nixpkgs/nixos/modules/services/misc/xmrig.nix
index 8ad2d049f8a9..d4e1be779972 100644
--- a/nixpkgs/nixos/modules/services/misc/xmrig.nix
+++ b/nixpkgs/nixos/modules/services/misc/xmrig.nix
@@ -13,7 +13,7 @@ with lib;
 {
   options = {
     services.xmrig = {
-      enable = mkEnableOption (lib.mdDoc "XMRig Mining Software");
+      enable = mkEnableOption "XMRig Mining Software";
 
       package = mkPackageOption pkgs "xmrig" {
         example = "xmrig-mo";
@@ -38,7 +38,7 @@ with lib;
             ]
           }
         '';
-        description = lib.mdDoc ''
+        description = ''
           XMRig configuration. Refer to
           <https://xmrig.com/docs/miner/config>
           for details on supported values.
diff --git a/nixpkgs/nixos/modules/services/misc/zoneminder.nix b/nixpkgs/nixos/modules/services/misc/zoneminder.nix
index fca03b2ad4e1..84c3a6710c0d 100644
--- a/nixpkgs/nixos/modules/services/misc/zoneminder.nix
+++ b/nixpkgs/nixos/modules/services/misc/zoneminder.nix
@@ -66,7 +66,7 @@ let
 in {
   options = {
     services.zoneminder = with lib; {
-      enable = lib.mkEnableOption (lib.mdDoc ''
+      enable = lib.mkEnableOption ''
         ZoneMinder.
 
         If you intend to run the database locally, you should set
@@ -75,12 +75,12 @@ in {
         and database user as well as populate the database yourself.
         Additionally, you will need to run `zmupdate.pl` yourself when
         upgrading to a newer version
-      '');
+      '';
 
       webserver = mkOption {
         type = types.enum [ "nginx" "none" ];
         default = "nginx";
-        description = lib.mdDoc ''
+        description = ''
           The webserver to configure for the PHP frontend.
 
           Set it to `none` if you want to configure it yourself. PRs are welcome
@@ -91,7 +91,7 @@ in {
       hostname = mkOption {
         type = types.str;
         default = "localhost";
-        description = lib.mdDoc ''
+        description = ''
           The hostname on which to listen.
         '';
       };
@@ -99,7 +99,7 @@ in {
       port = mkOption {
         type = types.port;
         default = 8095;
-        description = lib.mdDoc ''
+        description = ''
           The port on which to listen.
         '';
       };
@@ -107,7 +107,7 @@ in {
       openFirewall = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Open the firewall port(s).
         '';
       };
@@ -116,7 +116,7 @@ in {
         createLocally = mkOption {
           type = types.bool;
           default = false;
-          description = lib.mdDoc ''
+          description = ''
             Create the database and database user locally.
           '';
         };
@@ -124,7 +124,7 @@ in {
         host = mkOption {
           type = types.str;
           default = "localhost";
-          description = lib.mdDoc ''
+          description = ''
             Hostname hosting the database.
           '';
         };
@@ -132,7 +132,7 @@ in {
         name = mkOption {
           type = types.str;
           default = "zm";
-          description = lib.mdDoc ''
+          description = ''
             Name of database.
           '';
         };
@@ -140,7 +140,7 @@ in {
         username = mkOption {
           type = types.str;
           default = "zmuser";
-          description = lib.mdDoc ''
+          description = ''
             Username for accessing the database.
           '';
         };
@@ -148,7 +148,7 @@ in {
         password = mkOption {
           type = types.str;
           default = "zmpass";
-          description = lib.mdDoc ''
+          description = ''
             Username for accessing the database.
             Not used if `createLocally` is set.
           '';
@@ -158,7 +158,7 @@ in {
       cameras = mkOption {
         type = types.int;
         default = 1;
-        description = lib.mdDoc ''
+        description = ''
           Set this to the number of cameras you expect to support.
         '';
       };
@@ -167,7 +167,7 @@ in {
         type = types.nullOr types.str;
         default = null;
         example = "/storage/tank";
-        description = lib.mdDoc ''
+        description = ''
           ZoneMinder can generate quite a lot of data, so in case you don't want
           to use the default ${defaultDir}, you can override the path here.
         '';
@@ -176,7 +176,7 @@ in {
       extraConfig = mkOption {
         type = types.lines;
         default = "";
-        description = lib.mdDoc ''
+        description = ''
           Additional configuration added verbatim to the configuration file.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/misc/zookeeper.nix b/nixpkgs/nixos/modules/services/misc/zookeeper.nix
index b1c0b80648c6..3861a3cd2f4d 100644
--- a/nixpkgs/nixos/modules/services/misc/zookeeper.nix
+++ b/nixpkgs/nixos/modules/services/misc/zookeeper.nix
@@ -24,22 +24,22 @@ let
 in {
 
   options.services.zookeeper = {
-    enable = mkEnableOption (lib.mdDoc "Zookeeper");
+    enable = mkEnableOption "Zookeeper";
 
     port = mkOption {
-      description = lib.mdDoc "Zookeeper Client port.";
+      description = "Zookeeper Client port.";
       default = 2181;
       type = types.port;
     };
 
     id = mkOption {
-      description = lib.mdDoc "Zookeeper ID.";
+      description = "Zookeeper ID.";
       default = 0;
       type = types.int;
     };
 
     purgeInterval = mkOption {
-      description = lib.mdDoc ''
+      description = ''
         The time interval in hours for which the purge task has to be triggered. Set to a positive integer (1 and above) to enable the auto purging.
       '';
       default = 1;
@@ -47,7 +47,7 @@ in {
     };
 
     extraConf = mkOption {
-      description = lib.mdDoc "Extra configuration for Zookeeper.";
+      description = "Extra configuration for Zookeeper.";
       type = types.lines;
       default = ''
         initLimit=5
@@ -57,7 +57,7 @@ in {
     };
 
     servers = mkOption {
-      description = lib.mdDoc "All Zookeeper Servers.";
+      description = "All Zookeeper Servers.";
       default = "";
       type = types.lines;
       example = ''
@@ -68,7 +68,7 @@ in {
     };
 
     logging = mkOption {
-      description = lib.mdDoc "Zookeeper logging configuration.";
+      description = "Zookeeper logging configuration.";
       default = ''
         zookeeper.root.logger=INFO, CONSOLE
         log4j.rootLogger=INFO, CONSOLE
@@ -83,13 +83,13 @@ in {
     dataDir = mkOption {
       type = types.path;
       default = "/var/lib/zookeeper";
-      description = lib.mdDoc ''
+      description = ''
         Data directory for Zookeeper
       '';
     };
 
     extraCmdLineOptions = mkOption {
-      description = lib.mdDoc "Extra command line options for the Zookeeper launcher.";
+      description = "Extra command line options for the Zookeeper launcher.";
       default = [ "-Dcom.sun.management.jmxremote" "-Dcom.sun.management.jmxremote.local.only=true" ];
       type = types.listOf types.str;
       example = [ "-Djava.net.preferIPv4Stack=true" "-Dcom.sun.management.jmxremote" "-Dcom.sun.management.jmxremote.local.only=true" ];
@@ -98,7 +98,7 @@ in {
     preferIPv4 = mkOption {
       type = types.bool;
       default = true;
-      description = lib.mdDoc ''
+      description = ''
         Add the -Djava.net.preferIPv4Stack=true flag to the Zookeeper server.
       '';
     };
@@ -106,7 +106,7 @@ in {
     package = mkPackageOption pkgs "zookeeper" { };
 
     jre = mkOption {
-      description = lib.mdDoc "The JRE with which to run Zookeeper";
+      description = "The JRE with which to run Zookeeper";
       default = cfg.package.jre;
       defaultText = literalExpression "pkgs.zookeeper.jre";
       example = literalExpression "pkgs.jre";