about summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/_1password-gui.nix2
-rw-r--r--nixos/modules/programs/autojump.nix2
-rw-r--r--nixos/modules/programs/bandwhich.nix2
-rw-r--r--nixos/modules/programs/bash/undistract-me.nix2
-rw-r--r--nixos/modules/programs/captive-browser.nix10
-rw-r--r--nixos/modules/programs/ccache.nix4
-rw-r--r--nixos/modules/programs/cdemu.nix16
-rw-r--r--nixos/modules/programs/chromium.nix14
-rw-r--r--nixos/modules/programs/command-not-found/command-not-found.nix4
-rw-r--r--nixos/modules/programs/criu.nix4
-rw-r--r--nixos/modules/programs/digitalbitbox/default.nix4
-rw-r--r--nixos/modules/programs/dmrconfig.nix4
-rw-r--r--nixos/modules/programs/evince.nix2
-rw-r--r--nixos/modules/programs/feedbackd.nix2
-rw-r--r--nixos/modules/programs/file-roller.nix2
-rw-r--r--nixos/modules/programs/flashrom.nix2
-rw-r--r--nixos/modules/programs/flexoptix-app.nix2
-rw-r--r--nixos/modules/programs/freetds.nix2
-rw-r--r--nixos/modules/programs/fuse.nix4
-rw-r--r--nixos/modules/programs/gamemode.nix2
-rw-r--r--nixos/modules/programs/git.nix6
-rw-r--r--nixos/modules/programs/gnome-disks.nix2
-rw-r--r--nixos/modules/programs/gnome-documents.nix2
-rw-r--r--nixos/modules/programs/gnupg.nix14
-rw-r--r--nixos/modules/programs/gpaste.nix2
-rw-r--r--nixos/modules/programs/htop.nix4
-rw-r--r--nixos/modules/programs/java.nix2
-rw-r--r--nixos/modules/programs/k40-whisperer.nix4
-rw-r--r--nixos/modules/programs/kdeconnect.nix2
-rw-r--r--nixos/modules/programs/light.nix2
-rw-r--r--nixos/modules/programs/mosh.nix2
-rw-r--r--nixos/modules/programs/msmtp.nix6
-rw-r--r--nixos/modules/programs/mtr.nix4
-rw-r--r--nixos/modules/programs/neovim.nix30
-rw-r--r--nixos/modules/programs/nethoscope.nix2
-rw-r--r--nixos/modules/programs/nm-applet.nix2
-rw-r--r--nixos/modules/programs/nncp.nix4
-rw-r--r--nixos/modules/programs/noisetorch.nix2
-rw-r--r--nixos/modules/programs/npm.nix6
-rw-r--r--nixos/modules/programs/plotinus.nix2
-rw-r--r--nixos/modules/programs/screen.nix2
-rw-r--r--nixos/modules/programs/shadow.nix2
-rw-r--r--nixos/modules/programs/slock.nix2
-rw-r--r--nixos/modules/programs/ssh.nix70
-rw-r--r--nixos/modules/programs/steam.nix4
-rw-r--r--nixos/modules/programs/streamdeck-ui.nix2
-rw-r--r--nixos/modules/programs/sway.nix18
-rw-r--r--nixos/modules/programs/systemtap.nix4
-rw-r--r--nixos/modules/programs/thunar.nix2
-rw-r--r--nixos/modules/programs/tmux.nix32
-rw-r--r--nixos/modules/programs/traceroute.nix2
-rw-r--r--nixos/modules/programs/tsm-client.nix58
-rw-r--r--nixos/modules/programs/vim.nix4
-rw-r--r--nixos/modules/programs/wavemon.nix2
-rw-r--r--nixos/modules/programs/weylus.nix6
-rw-r--r--nixos/modules/programs/wireshark.nix4
-rw-r--r--nixos/modules/programs/xfs_quota.nix12
-rw-r--r--nixos/modules/programs/xonsh.nix6
-rw-r--r--nixos/modules/programs/xss-lock.nix6
-rw-r--r--nixos/modules/programs/xwayland.nix4
-rw-r--r--nixos/modules/programs/yabar.nix16
-rw-r--r--nixos/modules/programs/zsh/oh-my-zsh.nix6
-rw-r--r--nixos/modules/programs/zsh/zsh-autosuggestions.nix6
-rw-r--r--nixos/modules/programs/zsh/zsh-syntax-highlighting.nix6
-rw-r--r--nixos/modules/programs/zsh/zsh.nix36
65 files changed, 249 insertions, 249 deletions
diff --git a/nixos/modules/programs/_1password-gui.nix b/nixos/modules/programs/_1password-gui.nix
index 657116c267d92..20bd846d5162a 100644
--- a/nixos/modules/programs/_1password-gui.nix
+++ b/nixos/modules/programs/_1password-gui.nix
@@ -22,7 +22,7 @@ in
         type = types.listOf types.str;
         default = [ ];
         example = literalExpression ''["user1" "user2" "user3"]'';
-        description = ''
+        description = lib.mdDoc ''
           A list of users who should be able to integrate 1Password with polkit-based authentication mechanisms.
         '';
       };
diff --git a/nixos/modules/programs/autojump.nix b/nixos/modules/programs/autojump.nix
index ecfc2f658079d..dde6870d98905 100644
--- a/nixos/modules/programs/autojump.nix
+++ b/nixos/modules/programs/autojump.nix
@@ -13,7 +13,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to enable autojump.
         '';
       };
diff --git a/nixos/modules/programs/bandwhich.nix b/nixos/modules/programs/bandwhich.nix
index 610d602ad2cc9..8d1612217ad87 100644
--- a/nixos/modules/programs/bandwhich.nix
+++ b/nixos/modules/programs/bandwhich.nix
@@ -11,7 +11,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to add bandwhich to the global environment and configure a
           setcap wrapper for it.
         '';
diff --git a/nixos/modules/programs/bash/undistract-me.nix b/nixos/modules/programs/bash/undistract-me.nix
index 0e6465e048a10..8d1b1740f6448 100644
--- a/nixos/modules/programs/bash/undistract-me.nix
+++ b/nixos/modules/programs/bash/undistract-me.nix
@@ -14,7 +14,7 @@ in
 
       timeout = mkOption {
         default = 10;
-        description = ''
+        description = lib.mdDoc ''
           Number of seconds it would take for a command to be considered long-running.
         '';
         type = types.int;
diff --git a/nixos/modules/programs/captive-browser.nix b/nixos/modules/programs/captive-browser.nix
index 1e5c6ff9b2440..7ebce17bebfd2 100644
--- a/nixos/modules/programs/captive-browser.nix
+++ b/nixos/modules/programs/captive-browser.nix
@@ -40,12 +40,12 @@ in
         type = types.package;
         default = pkgs.captive-browser;
         defaultText = literalExpression "pkgs.captive-browser";
-        description = "Which package to use for captive-browser";
+        description = lib.mdDoc "Which package to use for captive-browser";
       };
 
       interface = mkOption {
         type = types.str;
-        description = "your public network interface (wlp3s0, wlan0, eth0, ...)";
+        description = lib.mdDoc "your public network interface (wlp3s0, wlan0, eth0, ...)";
       };
 
       # the options below are the same as in "captive-browser.toml"
@@ -53,7 +53,7 @@ in
         type = types.str;
         default = browserDefault pkgs.chromium;
         defaultText = literalExpression (browserDefault "\${pkgs.chromium}");
-        description = ''
+        description = lib.mdDoc ''
           The shell (/bin/sh) command executed once the proxy starts.
           When browser exits, the proxy exits. An extra env var PROXY is available.
 
@@ -69,7 +69,7 @@ in
 
       dhcp-dns = mkOption {
         type = types.str;
-        description = ''
+        description = lib.mdDoc ''
           The shell (/bin/sh) command executed to obtain the DHCP
           DNS server address. The first match of an IPv4 regex is used.
           IPv4 only, because let's be real, it's a captive portal.
@@ -79,7 +79,7 @@ in
       socks5-addr = mkOption {
         type = types.str;
         default = "localhost:1666";
-        description = "the listen address for the SOCKS5 proxy server";
+        description = lib.mdDoc "the listen address for the SOCKS5 proxy server";
       };
 
       bindInterface = mkOption {
diff --git a/nixos/modules/programs/ccache.nix b/nixos/modules/programs/ccache.nix
index 0f7fd0a3683c1..a554109533b26 100644
--- a/nixos/modules/programs/ccache.nix
+++ b/nixos/modules/programs/ccache.nix
@@ -9,13 +9,13 @@ in {
     enable = mkEnableOption "CCache";
     cacheDir = mkOption {
       type = types.path;
-      description = "CCache directory";
+      description = lib.mdDoc "CCache directory";
       default = "/var/cache/ccache";
     };
     # target configuration
     packageNames = mkOption {
       type = types.listOf types.str;
-      description = "Nix top-level packages to be compiled using CCache";
+      description = lib.mdDoc "Nix top-level packages to be compiled using CCache";
       default = [];
       example = [ "wxGTK30" "ffmpeg" "libav_all" ];
     };
diff --git a/nixos/modules/programs/cdemu.nix b/nixos/modules/programs/cdemu.nix
index 142e293424057..d43f009f2f92e 100644
--- a/nixos/modules/programs/cdemu.nix
+++ b/nixos/modules/programs/cdemu.nix
@@ -10,29 +10,29 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
-          <command>cdemu</command> for members of
-          <option>programs.cdemu.group</option>.
+        description = lib.mdDoc ''
+          {command}`cdemu` for members of
+          {option}`programs.cdemu.group`.
         '';
       };
       group = mkOption {
         type = types.str;
         default = "cdrom";
-        description = ''
-          Group that users must be in to use <command>cdemu</command>.
+        description = lib.mdDoc ''
+          Group that users must be in to use {command}`cdemu`.
         '';
       };
       gui = mkOption {
         type = types.bool;
         default = true;
-        description = ''
-          Whether to install the <command>cdemu</command> GUI (gCDEmu).
+        description = lib.mdDoc ''
+          Whether to install the {command}`cdemu` GUI (gCDEmu).
         '';
       };
       image-analyzer = mkOption {
         type = types.bool;
         default = true;
-        description = ''
+        description = lib.mdDoc ''
           Whether to install the image analyzer.
         '';
       };
diff --git a/nixos/modules/programs/chromium.nix b/nixos/modules/programs/chromium.nix
index 4b8bec33eb873..98eb071e61442 100644
--- a/nixos/modules/programs/chromium.nix
+++ b/nixos/modules/programs/chromium.nix
@@ -23,14 +23,14 @@ in
 
       extensions = mkOption {
         type = types.listOf types.str;
-        description = ''
+        description = lib.mdDoc ''
           List of chromium extensions to install.
           For list of plugins ids see id in url of extensions on
-          <link xlink:href="https://chrome.google.com/webstore/category/extensions">chrome web store</link>
+          [chrome web store](https://chrome.google.com/webstore/category/extensions)
           page. To install a chromium extension not included in the chrome web
           store, append to the extension id a semicolon ";" followed by a URL
           pointing to an Update Manifest XML file. See
-          <link xlink:href="https://cloud.google.com/docs/chrome-enterprise/policies/?policy=ExtensionInstallForcelist">ExtensionInstallForcelist</link>
+          [ExtensionInstallForcelist](https://cloud.google.com/docs/chrome-enterprise/policies/?policy=ExtensionInstallForcelist)
           for additional details.
         '';
         default = [];
@@ -46,21 +46,21 @@ in
 
       homepageLocation = mkOption {
         type = types.nullOr types.str;
-        description = "Chromium default homepage";
+        description = lib.mdDoc "Chromium default homepage";
         default = null;
         example = "https://nixos.org";
       };
 
       defaultSearchProviderEnabled = mkOption {
         type = types.nullOr types.bool;
-        description = "Enable the default search provider.";
+        description = lib.mdDoc "Enable the default search provider.";
         default = null;
         example = true;
       };
 
       defaultSearchProviderSearchURL = mkOption {
         type = types.nullOr types.str;
-        description = "Chromium default search provider url.";
+        description = lib.mdDoc "Chromium default search provider url.";
         default = null;
         example =
           "https://encrypted.google.com/search?q={searchTerms}&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}ie={inputEncoding}";
@@ -68,7 +68,7 @@ in
 
       defaultSearchProviderSuggestURL = mkOption {
         type = types.nullOr types.str;
-        description = "Chromium default search provider url for suggestions.";
+        description = lib.mdDoc "Chromium default search provider url for suggestions.";
         default = null;
         example =
           "https://encrypted.google.com/complete/search?output=chrome&q={searchTerms}";
diff --git a/nixos/modules/programs/command-not-found/command-not-found.nix b/nixos/modules/programs/command-not-found/command-not-found.nix
index 4d2a89b515842..b5c7626bd2075 100644
--- a/nixos/modules/programs/command-not-found/command-not-found.nix
+++ b/nixos/modules/programs/command-not-found/command-not-found.nix
@@ -26,7 +26,7 @@ in
     enable = mkOption {
       type = types.bool;
       default = true;
-      description = ''
+      description = lib.mdDoc ''
         Whether interactive shells should show which Nix package (if
         any) provides a missing command.
       '';
@@ -34,7 +34,7 @@ in
 
     dbPath = mkOption {
       default = "/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite" ;
-      description = ''
+      description = lib.mdDoc ''
         Absolute path to programs.sqlite.
 
         By default this file will be provided by your channel
diff --git a/nixos/modules/programs/criu.nix b/nixos/modules/programs/criu.nix
index 1714e1331a485..9f03b0c6431a9 100644
--- a/nixos/modules/programs/criu.nix
+++ b/nixos/modules/programs/criu.nix
@@ -10,8 +10,8 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
-          Install <command>criu</command> along with necessary kernel options.
+        description = lib.mdDoc ''
+          Install {command}`criu` along with necessary kernel options.
         '';
       };
     };
diff --git a/nixos/modules/programs/digitalbitbox/default.nix b/nixos/modules/programs/digitalbitbox/default.nix
index cabdf260cda3d..101ee8ddbafc4 100644
--- a/nixos/modules/programs/digitalbitbox/default.nix
+++ b/nixos/modules/programs/digitalbitbox/default.nix
@@ -11,7 +11,7 @@ in
     enable = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Installs the Digital Bitbox application and enables the complementary hardware module.
       '';
     };
@@ -20,7 +20,7 @@ in
       type = types.package;
       default = pkgs.digitalbitbox;
       defaultText = literalExpression "pkgs.digitalbitbox";
-      description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
+      description = lib.mdDoc "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
     };
   };
 
diff --git a/nixos/modules/programs/dmrconfig.nix b/nixos/modules/programs/dmrconfig.nix
index 89ac3443a1f33..20a0dc9556daa 100644
--- a/nixos/modules/programs/dmrconfig.nix
+++ b/nixos/modules/programs/dmrconfig.nix
@@ -14,7 +14,7 @@ in {
       enable = mkOption {
         default = false;
         type = types.bool;
-        description = ''
+        description = lib.mdDoc ''
           Whether to configure system to enable use of dmrconfig. This
           enables the required udev rules and installs the program.
         '';
@@ -25,7 +25,7 @@ in {
         default = pkgs.dmrconfig;
         type = types.package;
         defaultText = literalExpression "pkgs.dmrconfig";
-        description = "dmrconfig derivation to use";
+        description = lib.mdDoc "dmrconfig derivation to use";
       };
     };
   };
diff --git a/nixos/modules/programs/evince.nix b/nixos/modules/programs/evince.nix
index c033230afb102..bbc54241d52d2 100644
--- a/nixos/modules/programs/evince.nix
+++ b/nixos/modules/programs/evince.nix
@@ -28,7 +28,7 @@ in {
         type = types.package;
         default = pkgs.evince;
         defaultText = literalExpression "pkgs.evince";
-        description = "Evince derivation to use.";
+        description = lib.mdDoc "Evince derivation to use.";
       };
 
     };
diff --git a/nixos/modules/programs/feedbackd.nix b/nixos/modules/programs/feedbackd.nix
index 4194080c8a734..7e6cf829467db 100644
--- a/nixos/modules/programs/feedbackd.nix
+++ b/nixos/modules/programs/feedbackd.nix
@@ -13,7 +13,7 @@ in {
         Your user needs to be in the `feedbackd` group to trigger effects.
       '';
       package = mkOption {
-        description = ''
+        description = lib.mdDoc ''
           Which feedbackd package to use.
         '';
         type = types.package;
diff --git a/nixos/modules/programs/file-roller.nix b/nixos/modules/programs/file-roller.nix
index 3c47d59816548..ca2651becfea9 100644
--- a/nixos/modules/programs/file-roller.nix
+++ b/nixos/modules/programs/file-roller.nix
@@ -27,7 +27,7 @@ in {
         type = types.package;
         default = pkgs.gnome.file-roller;
         defaultText = literalExpression "pkgs.gnome.file-roller";
-        description = "File Roller derivation to use.";
+        description = lib.mdDoc "File Roller derivation to use.";
       };
 
     };
diff --git a/nixos/modules/programs/flashrom.nix b/nixos/modules/programs/flashrom.nix
index f026c2e31cda3..5f0de5a402341 100644
--- a/nixos/modules/programs/flashrom.nix
+++ b/nixos/modules/programs/flashrom.nix
@@ -10,7 +10,7 @@ in
     enable = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Installs flashrom and configures udev rules for programmers
         used by flashrom. Grants access to users in the "flashrom"
         group.
diff --git a/nixos/modules/programs/flexoptix-app.nix b/nixos/modules/programs/flexoptix-app.nix
index 5e169be2d8933..e87d1076508b8 100644
--- a/nixos/modules/programs/flexoptix-app.nix
+++ b/nixos/modules/programs/flexoptix-app.nix
@@ -10,7 +10,7 @@ in {
       enable = mkEnableOption "FLEXOPTIX app + udev rules";
 
       package = mkOption {
-        description = "FLEXOPTIX app package to use";
+        description = lib.mdDoc "FLEXOPTIX app package to use";
         type = types.package;
         default = pkgs.flexoptix-app;
         defaultText = literalExpression "pkgs.flexoptix-app";
diff --git a/nixos/modules/programs/freetds.nix b/nixos/modules/programs/freetds.nix
index d95c44d756afb..98274fa9b5626 100644
--- a/nixos/modules/programs/freetds.nix
+++ b/nixos/modules/programs/freetds.nix
@@ -26,7 +26,7 @@ in
         }
       '';
       description =
-        ''
+        lib.mdDoc ''
         Configure freetds database entries. Each attribute denotes
         a section within freetds.conf, and the value (a string) is the config
         content for that section. When at least one entry is configured
diff --git a/nixos/modules/programs/fuse.nix b/nixos/modules/programs/fuse.nix
index c15896efbb51a..b82d37a051e75 100644
--- a/nixos/modules/programs/fuse.nix
+++ b/nixos/modules/programs/fuse.nix
@@ -13,7 +13,7 @@ in {
       # negative numbers obviously make no sense:
       type = types.ints.between 0 32767; # 2^15 - 1
       default = 1000;
-      description = ''
+      description = lib.mdDoc ''
         Set the maximum number of FUSE mounts allowed to non-root users.
       '';
     };
@@ -21,7 +21,7 @@ in {
     userAllowOther = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Allow non-root users to specify the allow_other or allow_root mount
         options, see mount.fuse3(8).
       '';
diff --git a/nixos/modules/programs/gamemode.nix b/nixos/modules/programs/gamemode.nix
index a377a1619aa04..84e20934edb6c 100644
--- a/nixos/modules/programs/gamemode.nix
+++ b/nixos/modules/programs/gamemode.nix
@@ -19,7 +19,7 @@ in
       settings = mkOption {
         type = settingsFormat.type;
         default = {};
-        description = ''
+        description = lib.mdDoc ''
           System-wide configuration for GameMode (/etc/gamemode.ini).
           See gamemoded(8) man page for available settings.
         '';
diff --git a/nixos/modules/programs/git.nix b/nixos/modules/programs/git.nix
index 06ce374b19923..c4cf3cc561aec 100644
--- a/nixos/modules/programs/git.nix
+++ b/nixos/modules/programs/git.nix
@@ -16,7 +16,7 @@ in
         default = pkgs.git;
         defaultText = literalExpression "pkgs.git";
         example = literalExpression "pkgs.gitFull";
-        description = "The git package to use";
+        description = lib.mdDoc "The git package to use";
       };
 
       config = mkOption {
@@ -26,7 +26,7 @@ in
           init.defaultBranch = "main";
           url."https://github.com/".insteadOf = [ "gh:" "github:" ];
         };
-        description = ''
+        description = lib.mdDoc ''
           Configuration to write to /etc/gitconfig. See the CONFIGURATION FILE
           section of git-config(1) for more information.
         '';
@@ -39,7 +39,7 @@ in
           type = types.package;
           default = pkgs.git-lfs;
           defaultText = literalExpression "pkgs.git-lfs";
-          description = "The git-lfs package to use";
+          description = lib.mdDoc "The git-lfs package to use";
         };
       };
     };
diff --git a/nixos/modules/programs/gnome-disks.nix b/nixos/modules/programs/gnome-disks.nix
index 4b128b4712650..dcb20bd6037cd 100644
--- a/nixos/modules/programs/gnome-disks.nix
+++ b/nixos/modules/programs/gnome-disks.nix
@@ -26,7 +26,7 @@ with lib;
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to enable GNOME Disks daemon, a program designed to
           be a UDisks2 graphical front-end.
         '';
diff --git a/nixos/modules/programs/gnome-documents.nix b/nixos/modules/programs/gnome-documents.nix
index 43ad3163efd85..2831ac9aff2e9 100644
--- a/nixos/modules/programs/gnome-documents.nix
+++ b/nixos/modules/programs/gnome-documents.nix
@@ -26,7 +26,7 @@ with lib;
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to enable GNOME Documents, a document
           manager application for GNOME.
         '';
diff --git a/nixos/modules/programs/gnupg.nix b/nixos/modules/programs/gnupg.nix
index 7d8ab7dda9672..ad27766b72ecf 100644
--- a/nixos/modules/programs/gnupg.nix
+++ b/nixos/modules/programs/gnupg.nix
@@ -28,7 +28,7 @@ in
       type = types.package;
       default = pkgs.gnupg;
       defaultText = literalExpression "pkgs.gnupg";
-      description = ''
+      description = lib.mdDoc ''
         The gpg package that should be used.
       '';
     };
@@ -36,7 +36,7 @@ in
     agent.enable = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Enables GnuPG agent with socket-activation for every user session.
       '';
     };
@@ -44,7 +44,7 @@ in
     agent.enableSSHSupport = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Enable SSH agent support in GnuPG agent. Also sets SSH_AUTH_SOCK
         environment variable correctly. This will disable socket-activation
         and thus always start a GnuPG agent per user session.
@@ -54,7 +54,7 @@ in
     agent.enableExtraSocket = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Enable extra socket for GnuPG agent.
       '';
     };
@@ -62,7 +62,7 @@ in
     agent.enableBrowserSocket = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Enable browser socket for GnuPG agent.
       '';
     };
@@ -72,7 +72,7 @@ in
       example = "gnome3";
       default = defaultPinentryFlavor;
       defaultText = literalDocBook ''matching the configured desktop environment'';
-      description = ''
+      description = lib.mdDoc ''
         Which pinentry interface to use. If not null, the path to the
         pinentry binary will be passed to gpg-agent via commandline and
         thus overrides the pinentry option in gpg-agent.conf in the user's
@@ -86,7 +86,7 @@ in
     dirmngr.enable = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Enables GnuPG network certificate management daemon with socket-activation for every user session.
       '';
     };
diff --git a/nixos/modules/programs/gpaste.nix b/nixos/modules/programs/gpaste.nix
index cff2fb8d00348..074b4d59a365a 100644
--- a/nixos/modules/programs/gpaste.nix
+++ b/nixos/modules/programs/gpaste.nix
@@ -18,7 +18,7 @@ with lib;
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to enable GPaste, a clipboard manager.
         '';
       };
diff --git a/nixos/modules/programs/htop.nix b/nixos/modules/programs/htop.nix
index 5c197838e47c9..94f6e3c0efa72 100644
--- a/nixos/modules/programs/htop.nix
+++ b/nixos/modules/programs/htop.nix
@@ -21,7 +21,7 @@ in
       type = types.package;
       default = pkgs.htop;
       defaultText = "pkgs.htop";
-      description = ''
+      description = lib.mdDoc ''
         The htop package that should be used.
       '';
     };
@@ -35,7 +35,7 @@ in
         hide_kernel_threads = true;
         hide_userland_threads = true;
       };
-      description = ''
+      description = lib.mdDoc ''
         Extra global default configuration for htop
         which is read on first startup only.
         Htop subsequently uses ~/.config/htop/htoprc
diff --git a/nixos/modules/programs/java.nix b/nixos/modules/programs/java.nix
index 4e4e0629e5d97..5994f53f76b7b 100644
--- a/nixos/modules/programs/java.nix
+++ b/nixos/modules/programs/java.nix
@@ -35,7 +35,7 @@ in
       package = mkOption {
         default = pkgs.jdk;
         defaultText = literalExpression "pkgs.jdk";
-        description = ''
+        description = lib.mdDoc ''
           Java package to install. Typical values are pkgs.jdk or pkgs.jre.
         '';
         type = types.package;
diff --git a/nixos/modules/programs/k40-whisperer.nix b/nixos/modules/programs/k40-whisperer.nix
index 3163e45f57e45..305c828f0a8a2 100644
--- a/nixos/modules/programs/k40-whisperer.nix
+++ b/nixos/modules/programs/k40-whisperer.nix
@@ -14,7 +14,7 @@ in
 
     group = mkOption {
       type = types.str;
-      description = ''
+      description = lib.mdDoc ''
         Group assigned to the device when connected.
       '';
       default = "k40";
@@ -25,7 +25,7 @@ in
       default = pkgs.k40-whisperer;
       defaultText = literalExpression "pkgs.k40-whisperer";
       example = literalExpression "pkgs.k40-whisperer";
-      description = ''
+      description = lib.mdDoc ''
         K40 Whisperer package to use.
       '';
     };
diff --git a/nixos/modules/programs/kdeconnect.nix b/nixos/modules/programs/kdeconnect.nix
index 10d6e18a3d144..aa4302404ad47 100644
--- a/nixos/modules/programs/kdeconnect.nix
+++ b/nixos/modules/programs/kdeconnect.nix
@@ -16,7 +16,7 @@ with lib;
       defaultText = literalExpression "pkgs.plasma5Packages.kdeconnect-kde";
       type = types.package;
       example = literalExpression "pkgs.gnomeExtensions.gsconnect";
-      description = ''
+      description = lib.mdDoc ''
         The package providing the implementation for kdeconnect.
       '';
     };
diff --git a/nixos/modules/programs/light.nix b/nixos/modules/programs/light.nix
index 9f2a03e7e7639..57cc925be4655 100644
--- a/nixos/modules/programs/light.nix
+++ b/nixos/modules/programs/light.nix
@@ -12,7 +12,7 @@ in
       enable = mkOption {
         default = false;
         type = types.bool;
-        description = ''
+        description = lib.mdDoc ''
           Whether to install Light backlight control command
           and udev rules granting access to members of the "video" group.
         '';
diff --git a/nixos/modules/programs/mosh.nix b/nixos/modules/programs/mosh.nix
index e08099e21a00c..31aadb6aba616 100644
--- a/nixos/modules/programs/mosh.nix
+++ b/nixos/modules/programs/mosh.nix
@@ -10,7 +10,7 @@ in
 {
   options.programs.mosh = {
     enable = mkOption {
-      description = ''
+      description = lib.mdDoc ''
         Whether to enable mosh. Note, this will open ports in your firewall!
       '';
       default = false;
diff --git a/nixos/modules/programs/msmtp.nix b/nixos/modules/programs/msmtp.nix
index 9c067bdc96957..fbdab2cac559e 100644
--- a/nixos/modules/programs/msmtp.nix
+++ b/nixos/modules/programs/msmtp.nix
@@ -15,7 +15,7 @@ in {
       setSendmail = mkOption {
         type = types.bool;
         default = true;
-        description = ''
+        description = lib.mdDoc ''
           Whether to set the system sendmail to msmtp's.
         '';
       };
@@ -28,7 +28,7 @@ in {
           port = 587;
           tls = true;
         };
-        description = ''
+        description = lib.mdDoc ''
           Default values applied to all accounts.
           See msmtp(1) for the available options.
         '';
@@ -62,7 +62,7 @@ in {
       extraConfig = mkOption {
         type = types.lines;
         default = "";
-        description = ''
+        description = lib.mdDoc ''
           Extra lines to add to the msmtp configuration verbatim.
           See msmtp(1) for the syntax and available options.
         '';
diff --git a/nixos/modules/programs/mtr.nix b/nixos/modules/programs/mtr.nix
index 3cffe0fd8b2fa..173f247294174 100644
--- a/nixos/modules/programs/mtr.nix
+++ b/nixos/modules/programs/mtr.nix
@@ -11,7 +11,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to add mtr to the global environment and configure a
           setcap wrapper for it.
         '';
@@ -21,7 +21,7 @@ in {
         type = types.package;
         default = pkgs.mtr;
         defaultText = literalExpression "pkgs.mtr";
-        description = ''
+        description = lib.mdDoc ''
           The package to use.
         '';
       };
diff --git a/nixos/modules/programs/neovim.nix b/nixos/modules/programs/neovim.nix
index 4649662542dee..b1dbcd1813099 100644
--- a/nixos/modules/programs/neovim.nix
+++ b/nixos/modules/programs/neovim.nix
@@ -16,7 +16,7 @@ in {
     defaultEditor = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         When enabled, installs neovim and configures neovim to be the default editor
         using the EDITOR environment variable.
       '';
@@ -25,35 +25,35 @@ in {
     viAlias = mkOption {
       type = types.bool;
       default = false;
-      description = ''
-        Symlink <command>vi</command> to <command>nvim</command> binary.
+      description = lib.mdDoc ''
+        Symlink {command}`vi` to {command}`nvim` binary.
       '';
     };
 
     vimAlias = mkOption {
       type = types.bool;
       default = false;
-      description = ''
-        Symlink <command>vim</command> to <command>nvim</command> binary.
+      description = lib.mdDoc ''
+        Symlink {command}`vim` to {command}`nvim` binary.
       '';
     };
 
     withRuby = mkOption {
       type = types.bool;
       default = true;
-      description = "Enable Ruby provider.";
+      description = lib.mdDoc "Enable Ruby provider.";
     };
 
     withPython3 = mkOption {
       type = types.bool;
       default = true;
-      description = "Enable Python 3 provider.";
+      description = lib.mdDoc "Enable Python 3 provider.";
     };
 
     withNodeJs = mkOption {
       type = types.bool;
       default = false;
-      description = "Enable Node provider.";
+      description = lib.mdDoc "Enable Node provider.";
     };
 
     configure = mkOption {
@@ -82,7 +82,7 @@ in {
       type = types.package;
       default = pkgs.neovim-unwrapped;
       defaultText = literalExpression "pkgs.neovim-unwrapped";
-      description = "The package to use for the neovim binary.";
+      description = lib.mdDoc "The package to use for the neovim binary.";
     };
 
     finalPackage = mkOption {
@@ -97,8 +97,8 @@ in {
       example = literalExpression ''
         { "ftplugin/c.vim".text = "setlocal omnifunc=v:lua.vim.lsp.omnifunc"; }
       '';
-      description = ''
-        Set of files that have to be linked in <filename>runtime</filename>.
+      description = lib.mdDoc ''
+        Set of files that have to be linked in {file}`runtime`.
       '';
 
       type = with types; attrsOf (submodule (
@@ -108,7 +108,7 @@ in {
             enable = mkOption {
               type = types.bool;
               default = true;
-              description = ''
+              description = lib.mdDoc ''
                 Whether this /etc file should be generated.  This
                 option allows specific /etc files to be disabled.
               '';
@@ -116,7 +116,7 @@ in {
 
             target = mkOption {
               type = types.str;
-              description = ''
+              description = lib.mdDoc ''
                 Name of symlink.  Defaults to the attribute
                 name.
               '';
@@ -125,12 +125,12 @@ in {
             text = mkOption {
               default = null;
               type = types.nullOr types.lines;
-              description = "Text of the file.";
+              description = lib.mdDoc "Text of the file.";
             };
 
             source = mkOption {
               type = types.path;
-              description = "Path of the source file.";
+              description = lib.mdDoc "Path of the source file.";
             };
 
           };
diff --git a/nixos/modules/programs/nethoscope.nix b/nixos/modules/programs/nethoscope.nix
index 495548e9c6561..d8ece61c90a2b 100644
--- a/nixos/modules/programs/nethoscope.nix
+++ b/nixos/modules/programs/nethoscope.nix
@@ -12,7 +12,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to add nethoscope to the global environment and configure a
           setcap wrapper for it.
         '';
diff --git a/nixos/modules/programs/nm-applet.nix b/nixos/modules/programs/nm-applet.nix
index 5bcee30125bb8..ef24030c9db93 100644
--- a/nixos/modules/programs/nm-applet.nix
+++ b/nixos/modules/programs/nm-applet.nix
@@ -11,7 +11,7 @@
     indicator = lib.mkOption {
       type = lib.types.bool;
       default = true;
-      description = ''
+      description = lib.mdDoc ''
         Whether to use indicator instead of status icon.
         It is needed for Appindicator environments, like Enlightenment.
       '';
diff --git a/nixos/modules/programs/nncp.nix b/nixos/modules/programs/nncp.nix
index 29a703eadf10e..f40e888dad8c0 100644
--- a/nixos/modules/programs/nncp.nix
+++ b/nixos/modules/programs/nncp.nix
@@ -16,7 +16,7 @@ in {
     group = mkOption {
       type = types.str;
       default = "uucp";
-      description = ''
+      description = lib.mdDoc ''
         The group under which NNCP files shall be owned.
         Any member of this group may access the secret keys
         of this NNCP node.
@@ -27,7 +27,7 @@ in {
       type = types.package;
       default = pkgs.nncp;
       defaultText = literalExpression "pkgs.nncp";
-      description = "The NNCP package to use system-wide.";
+      description = lib.mdDoc "The NNCP package to use system-wide.";
     };
 
     secrets = mkOption {
diff --git a/nixos/modules/programs/noisetorch.nix b/nixos/modules/programs/noisetorch.nix
index f76555289f1a3..c69b2581296f0 100644
--- a/nixos/modules/programs/noisetorch.nix
+++ b/nixos/modules/programs/noisetorch.nix
@@ -11,7 +11,7 @@ in {
       type = types.package;
       default = pkgs.noisetorch;
       defaultText = literalExpression "pkgs.noisetorch";
-      description = ''
+      description = lib.mdDoc ''
         The noisetorch package to use.
       '';
     };
diff --git a/nixos/modules/programs/npm.nix b/nixos/modules/programs/npm.nix
index d79c6c7340007..709438048347e 100644
--- a/nixos/modules/programs/npm.nix
+++ b/nixos/modules/programs/npm.nix
@@ -15,7 +15,7 @@ in
 
       package = mkOption {
         type = types.package;
-        description = "The npm package version / flavor to use";
+        description = lib.mdDoc "The npm package version / flavor to use";
         default = pkgs.nodePackages.npm;
         defaultText = literalExpression "pkgs.nodePackages.npm";
         example = literalExpression "pkgs.nodePackages_13_x.npm";
@@ -23,9 +23,9 @@ in
 
       npmrc = mkOption {
         type = lib.types.lines;
-        description = ''
+        description = lib.mdDoc ''
           The system-wide npm configuration.
-          See <link xlink:href="https://docs.npmjs.com/misc/config"/>.
+          See <https://docs.npmjs.com/misc/config>.
         '';
         default = ''
           prefix = ''${HOME}/.npm
diff --git a/nixos/modules/programs/plotinus.nix b/nixos/modules/programs/plotinus.nix
index 2c90a41ba0296..a011bb862aeaf 100644
--- a/nixos/modules/programs/plotinus.nix
+++ b/nixos/modules/programs/plotinus.nix
@@ -17,7 +17,7 @@ in
     programs.plotinus = {
       enable = mkOption {
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to enable the Plotinus GTK 3 plugin. Plotinus provides a
           popup (triggered by Ctrl-Shift-P) to search the menus of a
           compatible application.
diff --git a/nixos/modules/programs/screen.nix b/nixos/modules/programs/screen.nix
index 728a0eb8cea5b..68de9e52d7be3 100644
--- a/nixos/modules/programs/screen.nix
+++ b/nixos/modules/programs/screen.nix
@@ -13,7 +13,7 @@ in
 
       screenrc = mkOption {
         default = "";
-        description = ''
+        description = lib.mdDoc ''
           The contents of /etc/screenrc file.
         '';
         type = types.lines;
diff --git a/nixos/modules/programs/shadow.nix b/nixos/modules/programs/shadow.nix
index 963cd8853dbbb..fab809f279a36 100644
--- a/nixos/modules/programs/shadow.nix
+++ b/nixos/modules/programs/shadow.nix
@@ -59,7 +59,7 @@ in
   options = {
 
     users.defaultUserShell = lib.mkOption {
-      description = ''
+      description = lib.mdDoc ''
         This option defines the default shell assigned to user
         accounts. This can be either a full system path or a shell package.
 
diff --git a/nixos/modules/programs/slock.nix b/nixos/modules/programs/slock.nix
index ce80fcc5d4a8a..3db9866d9f1c3 100644
--- a/nixos/modules/programs/slock.nix
+++ b/nixos/modules/programs/slock.nix
@@ -12,7 +12,7 @@ in
       enable = mkOption {
         default = false;
         type = types.bool;
-        description = ''
+        description = lib.mdDoc ''
           Whether to install slock screen locker with setuid wrapper.
         '';
       };
diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix
index 75685de4f04e3..e0da6ef3b3ad3 100644
--- a/nixos/modules/programs/ssh.nix
+++ b/nixos/modules/programs/ssh.nix
@@ -40,20 +40,20 @@ in
         type = types.bool;
         default = config.services.xserver.enable;
         defaultText = literalExpression "config.services.xserver.enable";
-        description = "Whether to configure SSH_ASKPASS in the environment.";
+        description = lib.mdDoc "Whether to configure SSH_ASKPASS in the environment.";
       };
 
       askPassword = mkOption {
         type = types.str;
         default = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
         defaultText = literalExpression ''"''${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass"'';
-        description = "Program used by SSH to ask for passwords.";
+        description = lib.mdDoc "Program used by SSH to ask for passwords.";
       };
 
       forwardX11 = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to request X11 forwarding on outgoing connections by default.
           This is useful for running graphical programs on the remote machine and have them display to your local X11 server.
           Historically, this value has depended on the value used by the local sshd daemon, but there really isn't a relation between the two.
@@ -66,8 +66,8 @@ in
 
       setXAuthLocation = mkOption {
         type = types.bool;
-        description = ''
-          Whether to set the path to <command>xauth</command> for X11-forwarded connections.
+        description = lib.mdDoc ''
+          Whether to set the path to {command}`xauth` for X11-forwarded connections.
           This causes a dependency on X11 packages.
         '';
       };
@@ -76,7 +76,7 @@ in
         type = types.listOf types.str;
         default = [];
         example = [ "ssh-ed25519" "ssh-rsa" ];
-        description = ''
+        description = lib.mdDoc ''
           Specifies the key types that will be used for public key authentication.
         '';
       };
@@ -85,7 +85,7 @@ in
         type = types.listOf types.str;
         default = [];
         example = [ "ssh-ed25519" "ssh-rsa" ];
-        description = ''
+        description = lib.mdDoc ''
           Specifies the host key algorithms that the client wants to use in order of preference.
         '';
       };
@@ -104,11 +104,11 @@ in
       startAgent = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to start the OpenSSH agent when you log in.  The OpenSSH agent
           remembers private keys for you so that you don't have to type in
           passphrases every time you make an SSH connection.  Use
-          <command>ssh-add</command> to add a key to the agent.
+          {command}`ssh-add` to add a key to the agent.
         '';
       };
 
@@ -116,7 +116,7 @@ in
         type = types.nullOr types.str;
         default = null;
         example = "1h";
-        description = ''
+        description = lib.mdDoc ''
           How long to keep the private keys in memory. Use null to keep them forever.
         '';
       };
@@ -125,7 +125,7 @@ in
         type = types.nullOr types.str;
         default = null;
         example = literalExpression ''"''${pkgs.opensc}/lib/opensc-pkcs11.so"'';
-        description = ''
+        description = lib.mdDoc ''
           A pattern-list of acceptable paths for PKCS#11 shared libraries
           that may be used with the -s option to ssh-add.
         '';
@@ -135,7 +135,7 @@ in
         type = types.package;
         default = pkgs.openssh;
         defaultText = literalExpression "pkgs.openssh";
-        description = ''
+        description = lib.mdDoc ''
           The package used for the openssh client and daemon.
         '';
       };
@@ -147,7 +147,7 @@ in
             certAuthority = mkOption {
               type = types.bool;
               default = false;
-              description = ''
+              description = lib.mdDoc ''
                 This public key is an SSH certificate authority, rather than an
                 individual host's key.
               '';
@@ -156,32 +156,32 @@ in
               type = types.listOf types.str;
               default = [ name ] ++ config.extraHostNames;
               defaultText = literalExpression "[ ${name} ] ++ config.${options.extraHostNames}";
-              description = ''
+              description = lib.mdDoc ''
                 A list of host names and/or IP numbers used for accessing
                 the host's ssh service. This list includes the name of the
-                containing <literal>knownHosts</literal> attribute by default
+                containing `knownHosts` attribute by default
                 for convenience. If you wish to configure multiple host keys
-                for the same host use multiple <literal>knownHosts</literal>
+                for the same host use multiple `knownHosts`
                 entries with different attribute names and the same
-                <literal>hostNames</literal> list.
+                `hostNames` list.
               '';
             };
             extraHostNames = mkOption {
               type = types.listOf types.str;
               default = [];
-              description = ''
+              description = lib.mdDoc ''
                 A list of additional host names and/or IP numbers used for
                 accessing the host's ssh service. This list is ignored if
-                <literal>hostNames</literal> is set explicitly.
+                `hostNames` is set explicitly.
               '';
             };
             publicKey = mkOption {
               default = null;
               type = types.nullOr types.str;
               example = "ecdsa-sha2-nistp521 AAAAE2VjZHN...UEPg==";
-              description = ''
+              description = lib.mdDoc ''
                 The public key data for the host. You can fetch a public key
-                from a running SSH server with the <command>ssh-keyscan</command>
+                from a running SSH server with the {command}`ssh-keyscan`
                 command. The public key should not include any host names, only
                 the key type and the key itself.
               '';
@@ -189,25 +189,25 @@ in
             publicKeyFile = mkOption {
               default = null;
               type = types.nullOr types.path;
-              description = ''
+              description = lib.mdDoc ''
                 The path to the public key file for the host. The public
                 key file is read at build time and saved in the Nix store.
                 You can fetch a public key file from a running SSH server
-                with the <command>ssh-keyscan</command> command. The content
+                with the {command}`ssh-keyscan` command. The content
                 of the file should follow the same format as described for
-                the <literal>publicKey</literal> option. Only a single key
+                the `publicKey` option. Only a single key
                 is supported. If a host has multiple keys, use
-                <option>programs.ssh.knownHostsFiles</option> instead.
+                {option}`programs.ssh.knownHostsFiles` instead.
               '';
             };
           };
         }));
-        description = ''
+        description = lib.mdDoc ''
           The set of system-wide known SSH hosts. To make simple setups more
           convenient the name of an attribute in this set is used as a host name
           for the entry. This behaviour can be disabled by setting
-          <literal>hostNames</literal> explicitly. You can use
-          <literal>extraHostNames</literal> to add additional host names without
+          `hostNames` explicitly. You can use
+          `extraHostNames` to add additional host names without
           disabling this default.
         '';
         example = literalExpression ''
@@ -228,11 +228,11 @@ in
       knownHostsFiles = mkOption {
         default = [];
         type = with types; listOf path;
-        description = ''
+        description = lib.mdDoc ''
           Files containing SSH host keys to set as global known hosts.
-          <literal>/etc/ssh/ssh_known_hosts</literal> (which is
-          generated by <option>programs.ssh.knownHosts</option>) and
-          <literal>/etc/ssh/ssh_known_hosts2</literal> are always
+          `/etc/ssh/ssh_known_hosts` (which is
+          generated by {option}`programs.ssh.knownHosts`) and
+          `/etc/ssh/ssh_known_hosts2` are always
           included.
         '';
         example = literalExpression ''
@@ -251,7 +251,7 @@ in
         type = types.nullOr (types.listOf types.str);
         default = null;
         example = [ "curve25519-sha256@libssh.org" "diffie-hellman-group-exchange-sha256" ];
-        description = ''
+        description = lib.mdDoc ''
           Specifies the available KEX (Key Exchange) algorithms.
         '';
       };
@@ -260,7 +260,7 @@ in
         type = types.nullOr (types.listOf types.str);
         default = null;
         example = [ "chacha20-poly1305@openssh.com" "aes256-gcm@openssh.com" ];
-        description = ''
+        description = lib.mdDoc ''
           Specifies the ciphers allowed and their order of preference.
         '';
       };
@@ -269,7 +269,7 @@ in
         type = types.nullOr (types.listOf types.str);
         default = null;
         example = [ "hmac-sha2-512-etm@openssh.com" "hmac-sha1" ];
-        description = ''
+        description = lib.mdDoc ''
           Specifies the MAC (message authentication code) algorithms in order of preference. The MAC algorithm is used
           for data integrity protection.
         '';
diff --git a/nixos/modules/programs/steam.nix b/nixos/modules/programs/steam.nix
index ff4deba2bf0ae..d80718e792aff 100644
--- a/nixos/modules/programs/steam.nix
+++ b/nixos/modules/programs/steam.nix
@@ -18,7 +18,7 @@ in {
     remotePlay.openFirewall = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Open ports in the firewall for Steam Remote Play.
       '';
     };
@@ -26,7 +26,7 @@ in {
     dedicatedServer.openFirewall = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Open ports in the firewall for Source Dedicated Server.
       '';
     };
diff --git a/nixos/modules/programs/streamdeck-ui.nix b/nixos/modules/programs/streamdeck-ui.nix
index 1434f82660de3..04aa0a80e8897 100644
--- a/nixos/modules/programs/streamdeck-ui.nix
+++ b/nixos/modules/programs/streamdeck-ui.nix
@@ -11,7 +11,7 @@ in {
     autoStart = mkOption {
       default = true;
       type = types.bool;
-      description = "Whether streamdeck-ui should be started automatically.";
+      description = lib.mdDoc "Whether streamdeck-ui should be started automatically.";
     };
   };
 
diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix
index 01b0472813447..decae1b4d2da2 100644
--- a/nixos/modules/programs/sway.nix
+++ b/nixos/modules/programs/sway.nix
@@ -12,7 +12,7 @@ let
           type = types.bool;
           inherit default;
           example = !default;
-          description = "Whether to make use of the ${description}";
+          description = lib.mdDoc "Whether to make use of the ${description}";
         };
       in {
         base = mkWrapperFeature true ''
@@ -46,7 +46,7 @@ in {
       type = wrapperOptions;
       default = { };
       example = { gtk = true; };
-      description = ''
+      description = lib.mdDoc ''
         Attribute set of features to enable in the wrapper.
       '';
     };
@@ -64,10 +64,10 @@ in {
         # use this if they aren't displayed properly:
         export _JAVA_AWT_WM_NONREPARENTING=1
       '';
-      description = ''
+      description = lib.mdDoc ''
         Shell commands executed just before Sway is started. See
-        <link xlink:href="https://github.com/swaywm/sway/wiki/Running-programs-natively-under-wayland" />
-        and <link xlink:href="https://github.com/swaywm/wlroots/blob/master/docs/env_vars.md" />
+        <https://github.com/swaywm/sway/wiki/Running-programs-natively-under-wayland>
+        and <https://github.com/swaywm/wlroots/blob/master/docs/env_vars.md>
         for some useful environment variables.
       '';
     };
@@ -81,7 +81,7 @@ in {
         "--unsupported-gpu"
         "--my-next-gpu-wont-be-nvidia"
       ];
-      description = ''
+      description = lib.mdDoc ''
         Command line arguments passed to launch Sway. Please DO NOT report
         issues if you use an unsupported GPU (proprietary drivers).
       '';
@@ -101,10 +101,10 @@ in {
           termite rofi light
         ]
       '';
-      description = ''
+      description = lib.mdDoc ''
         Extra packages to be installed system wide. See
-        <link xlink:href="https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway" /> and
-        <link xlink:href="https://github.com/swaywm/sway/wiki/i3-Migration-Guide#common-x11-apps-used-on-i3-with-wayland-alternatives" />
+        <https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway> and
+        <https://github.com/swaywm/sway/wiki/i3-Migration-Guide#common-x11-apps-used-on-i3-with-wayland-alternatives>
         for a list of useful software.
       '';
     };
diff --git a/nixos/modules/programs/systemtap.nix b/nixos/modules/programs/systemtap.nix
index 360e106678e65..cbb9ec164c6ca 100644
--- a/nixos/modules/programs/systemtap.nix
+++ b/nixos/modules/programs/systemtap.nix
@@ -10,8 +10,8 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
-          Install <command>systemtap</command> along with necessary kernel options.
+        description = lib.mdDoc ''
+          Install {command}`systemtap` along with necessary kernel options.
         '';
       };
     };
diff --git a/nixos/modules/programs/thunar.nix b/nixos/modules/programs/thunar.nix
index 5ea2982dd93cf..a67d8ae064dfe 100644
--- a/nixos/modules/programs/thunar.nix
+++ b/nixos/modules/programs/thunar.nix
@@ -16,7 +16,7 @@ in {
       plugins = mkOption {
         default = [];
         type = types.listOf types.package;
-        description = "List of thunar plugins to install.";
+        description = lib.mdDoc "List of thunar plugins to install.";
         example = literalExpression "with pkgs.xfce; [ thunar-archive-plugin thunar-volman ]";
       };
 
diff --git a/nixos/modules/programs/tmux.nix b/nixos/modules/programs/tmux.nix
index 74b3fbd9ac069..cf7ea4cfcf76a 100644
--- a/nixos/modules/programs/tmux.nix
+++ b/nixos/modules/programs/tmux.nix
@@ -70,14 +70,14 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = "Whenever to configure <command>tmux</command> system-wide.";
+        description = lib.mdDoc "Whenever to configure {command}`tmux` system-wide.";
         relatedPackages = [ "tmux" ];
       };
 
       aggressiveResize = mkOption {
         default = false;
         type = types.bool;
-        description = ''
+        description = lib.mdDoc ''
           Resize the window to the size of the smallest session for which it is the current window.
         '';
       };
@@ -86,31 +86,31 @@ in {
         default = 0;
         example = 1;
         type = types.int;
-        description = "Base index for windows and panes.";
+        description = lib.mdDoc "Base index for windows and panes.";
       };
 
       clock24 = mkOption {
         default = false;
         type = types.bool;
-        description = "Use 24 hour clock.";
+        description = lib.mdDoc "Use 24 hour clock.";
       };
 
       customPaneNavigationAndResize = mkOption {
         default = false;
         type = types.bool;
-        description = "Override the hjkl and HJKL bindings for pane navigation and resizing in VI mode.";
+        description = lib.mdDoc "Override the hjkl and HJKL bindings for pane navigation and resizing in VI mode.";
       };
 
       escapeTime = mkOption {
         default = 500;
         example = 0;
         type = types.int;
-        description = "Time in milliseconds for which tmux waits after an escape is input.";
+        description = lib.mdDoc "Time in milliseconds for which tmux waits after an escape is input.";
       };
 
       extraConfig = mkOption {
         default = "";
-        description = ''
+        description = lib.mdDoc ''
           Additional contents of /etc/tmux.conf
         '';
         type = types.lines;
@@ -120,53 +120,53 @@ in {
         default = 2000;
         example = 5000;
         type = types.int;
-        description = "Maximum number of lines held in window history.";
+        description = lib.mdDoc "Maximum number of lines held in window history.";
       };
 
       keyMode = mkOption {
         default = defaultKeyMode;
         example = "vi";
         type = types.enum [ "emacs" "vi" ];
-        description = "VI or Emacs style shortcuts.";
+        description = lib.mdDoc "VI or Emacs style shortcuts.";
       };
 
       newSession = mkOption {
         default = false;
         type = types.bool;
-        description = "Automatically spawn a session if trying to attach and none are running.";
+        description = lib.mdDoc "Automatically spawn a session if trying to attach and none are running.";
       };
 
       reverseSplit = mkOption {
         default = false;
         type = types.bool;
-        description = "Reverse the window split shortcuts.";
+        description = lib.mdDoc "Reverse the window split shortcuts.";
       };
 
       resizeAmount = mkOption {
         default = defaultResize;
         example = 10;
         type = types.int;
-        description = "Number of lines/columns when resizing.";
+        description = lib.mdDoc "Number of lines/columns when resizing.";
       };
 
       shortcut = mkOption {
         default = defaultShortcut;
         example = "a";
         type = types.str;
-        description = "Ctrl following by this key is used as the main shortcut.";
+        description = lib.mdDoc "Ctrl following by this key is used as the main shortcut.";
       };
 
       terminal = mkOption {
         default = defaultTerminal;
         example = "screen-256color";
         type = types.str;
-        description = "Set the $TERM variable.";
+        description = lib.mdDoc "Set the $TERM variable.";
       };
 
       secureSocket = mkOption {
         default = true;
         type = types.bool;
-        description = ''
+        description = lib.mdDoc ''
           Store tmux socket under /run, which is more secure than /tmp, but as a
           downside it doesn't survive user logout.
         '';
@@ -175,7 +175,7 @@ in {
       plugins = mkOption {
         default = [];
         type = types.listOf types.package;
-        description = "List of plugins to install.";
+        description = lib.mdDoc "List of plugins to install.";
         example = lib.literalExpression "[ pkgs.tmuxPlugins.nord ]";
       };
     };
diff --git a/nixos/modules/programs/traceroute.nix b/nixos/modules/programs/traceroute.nix
index 6e04057ac5034..df5f10b87d5f3 100644
--- a/nixos/modules/programs/traceroute.nix
+++ b/nixos/modules/programs/traceroute.nix
@@ -10,7 +10,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to configure a setcap wrapper for traceroute.
         '';
       };
diff --git a/nixos/modules/programs/tsm-client.nix b/nixos/modules/programs/tsm-client.nix
index 28db96253875f..0a3af3744a78f 100644
--- a/nixos/modules/programs/tsm-client.nix
+++ b/nixos/modules/programs/tsm-client.nix
@@ -26,43 +26,43 @@ let
     options.name = mkOption {
       type = servernameType;
       example = "mainTsmServer";
-      description = ''
+      description = lib.mdDoc ''
         Local name of the IBM TSM server,
         must be uncapitalized and no longer than 64 chars.
         The value will be used for the
-        <literal>server</literal>
-        directive in <filename>dsm.sys</filename>.
+        `server`
+        directive in {file}`dsm.sys`.
       '';
     };
     options.server = mkOption {
       type = nonEmptyStr;
       example = "tsmserver.company.com";
-      description = ''
+      description = lib.mdDoc ''
         Host/domain name or IP address of the IBM TSM server.
         The value will be used for the
-        <literal>tcpserveraddress</literal>
-        directive in <filename>dsm.sys</filename>.
+        `tcpserveraddress`
+        directive in {file}`dsm.sys`.
       '';
     };
     options.port = mkOption {
       type = addCheck port (p: p<=32767);
       default = 1500;  # official default
-      description = ''
+      description = lib.mdDoc ''
         TCP port of the IBM TSM server.
         The value will be used for the
-        <literal>tcpport</literal>
-        directive in <filename>dsm.sys</filename>.
+        `tcpport`
+        directive in {file}`dsm.sys`.
         TSM does not support ports above 32767.
       '';
     };
     options.node = mkOption {
       type = nonEmptyStr;
       example = "MY-TSM-NODE";
-      description = ''
+      description = lib.mdDoc ''
         Target node name on the IBM TSM server.
         The value will be used for the
-        <literal>nodename</literal>
-        directive in <filename>dsm.sys</filename>.
+        `nodename`
+        directive in {file}`dsm.sys`.
       '';
     };
     options.genPasswd = mkEnableOption ''
@@ -80,12 +80,12 @@ let
     options.passwdDir = mkOption {
       type = path;
       example = "/home/alice/tsm-password";
-      description = ''
+      description = lib.mdDoc ''
         Directory that holds the TSM
         node's password information.
         The value will be used for the
-        <literal>passworddir</literal>
-        directive in <filename>dsm.sys</filename>.
+        `passworddir`
+        directive in {file}`dsm.sys`.
       '';
     };
     options.includeExclude = mkOption {
@@ -114,9 +114,9 @@ let
       default = {};
       example.compression = "yes";
       example.passwordaccess = null;
-      description = ''
+      description = lib.mdDoc ''
         Additional key-value pairs for the server stanza.
-        Values must be strings, or <literal>null</literal>
+        Values must be strings, or `null`
         for the key not to be used in the stanza
         (e.g. to overrule values generated by other options).
       '';
@@ -125,13 +125,13 @@ let
       type = lines;
       example = literalExpression
         ''lib.modules.mkAfter "compression no"'';
-      description = ''
+      description = lib.mdDoc ''
         Additional text lines for the server stanza.
         This option can be used if certion configuration keys
         must be used multiple times or ordered in a certain way
-        as the <option>extraConfig</option> option can't
+        as the {option}`extraConfig` option can't
         control the order of lines in the resulting stanza.
-        Note that the <literal>server</literal>
+        Note that the `server`
         line at the beginning of the stanza is
         not part of this option's value.
       '';
@@ -185,7 +185,7 @@ let
         node = "MY-TSM-NODE";
         extraConfig.compression = "yes";
       };
-      description = ''
+      description = lib.mdDoc ''
         Server definitions ("stanzas")
         for the client system-options file.
       '';
@@ -194,20 +194,20 @@ let
       type = nullOr servernameType;
       default = null;
       example = "mainTsmServer";
-      description = ''
+      description = lib.mdDoc ''
         If multiple server stanzas are declared with
-        <option>programs.tsmClient.servers</option>,
+        {option}`programs.tsmClient.servers`,
         this option may be used to name a default
         server stanza that IBM TSM uses in the absence of
-        a user-defined <filename>dsm.opt</filename> file.
+        a user-defined {file}`dsm.opt` file.
         This option translates to a
-        <literal>defaultserver</literal> configuration line.
+        `defaultserver` configuration line.
       '';
     };
     dsmSysText = mkOption {
       type = lines;
       readOnly = true;
-      description = ''
+      description = lib.mdDoc ''
         This configuration key contains the effective text
         of the client system-options file "dsm.sys".
         It should not be changed, but may be
@@ -220,17 +220,17 @@ let
       default = pkgs.tsm-client;
       defaultText = literalExpression "pkgs.tsm-client";
       example = literalExpression "pkgs.tsm-client-withGui";
-      description = ''
+      description = lib.mdDoc ''
         The TSM client derivation to be
         added to the system environment.
-        It will called with <literal>.override</literal>
+        It will called with `.override`
         to add paths to the client system-options file.
       '';
     };
     wrappedPackage = mkOption {
       type = package;
       readOnly = true;
-      description = ''
+      description = lib.mdDoc ''
         The TSM client derivation, wrapped with the path
         to the client system-options file "dsm.sys".
         This option is to provide the effective derivation
diff --git a/nixos/modules/programs/vim.nix b/nixos/modules/programs/vim.nix
index 1695bc994732c..15983e371f0eb 100644
--- a/nixos/modules/programs/vim.nix
+++ b/nixos/modules/programs/vim.nix
@@ -9,7 +9,7 @@ in {
     defaultEditor = mkOption {
       type = types.bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         When enabled, installs vim and configures vim to be the default editor
         using the EDITOR environment variable.
       '';
@@ -20,7 +20,7 @@ in {
       default = pkgs.vim;
       defaultText = literalExpression "pkgs.vim";
       example = literalExpression "pkgs.vimHugeX";
-      description = ''
+      description = lib.mdDoc ''
         vim package to use.
       '';
     };
diff --git a/nixos/modules/programs/wavemon.nix b/nixos/modules/programs/wavemon.nix
index e5ccacba75d4a..4dbf2748913eb 100644
--- a/nixos/modules/programs/wavemon.nix
+++ b/nixos/modules/programs/wavemon.nix
@@ -10,7 +10,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to add wavemon to the global environment and configure a
           setcap wrapper for it.
         '';
diff --git a/nixos/modules/programs/weylus.nix b/nixos/modules/programs/weylus.nix
index ea92c77e7c321..0a506bfa27851 100644
--- a/nixos/modules/programs/weylus.nix
+++ b/nixos/modules/programs/weylus.nix
@@ -12,7 +12,7 @@ in
     openFirewall = mkOption {
       type = bool;
       default = false;
-      description = ''
+      description = lib.mdDoc ''
         Open ports needed for the functionality of the program.
       '';
     };
@@ -20,7 +20,7 @@ in
      users = mkOption {
       type = listOf str;
       default = [ ];
-      description = ''
+      description = lib.mdDoc ''
         To enable stylus and multi-touch support, the user you're going to use must be added to this list.
         These users can synthesize input events system-wide, even when another user is logged in - untrusted users should not be added.
       '';
@@ -30,7 +30,7 @@ in
       type = package;
       default = pkgs.weylus;
       defaultText = "pkgs.weylus";
-      description = "Weylus package to install.";
+      description = lib.mdDoc "Weylus package to install.";
     };
   };
   config = mkIf cfg.enable {
diff --git a/nixos/modules/programs/wireshark.nix b/nixos/modules/programs/wireshark.nix
index f7b0727cb2b39..088c2bb7958aa 100644
--- a/nixos/modules/programs/wireshark.nix
+++ b/nixos/modules/programs/wireshark.nix
@@ -11,7 +11,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to add Wireshark to the global environment and configure a
           setcap wrapper for 'dumpcap' for users in the 'wireshark' group.
         '';
@@ -20,7 +20,7 @@ in {
         type = types.package;
         default = pkgs.wireshark-cli;
         defaultText = literalExpression "pkgs.wireshark-cli";
-        description = ''
+        description = lib.mdDoc ''
           Which Wireshark package to install in the global environment.
         '';
       };
diff --git a/nixos/modules/programs/xfs_quota.nix b/nixos/modules/programs/xfs_quota.nix
index c03e59a5b4abe..a1e9ff941c6b8 100644
--- a/nixos/modules/programs/xfs_quota.nix
+++ b/nixos/modules/programs/xfs_quota.nix
@@ -28,37 +28,37 @@ in
           options = {
             id = mkOption {
               type = types.int;
-              description = "Project ID.";
+              description = lib.mdDoc "Project ID.";
             };
 
             fileSystem = mkOption {
               type = types.str;
-              description = "XFS filesystem hosting the xfs_quota project.";
+              description = lib.mdDoc "XFS filesystem hosting the xfs_quota project.";
               default = "/";
             };
 
             path = mkOption {
               type = types.str;
-              description = "Project directory.";
+              description = lib.mdDoc "Project directory.";
             };
 
             sizeSoftLimit = mkOption {
               type = types.nullOr types.str;
               default = null;
               example = "30g";
-              description = "Soft limit of the project size";
+              description = lib.mdDoc "Soft limit of the project size";
             };
 
             sizeHardLimit = mkOption {
               type = types.nullOr types.str;
               default = null;
               example = "50g";
-              description = "Hard limit of the project size.";
+              description = lib.mdDoc "Hard limit of the project size.";
             };
           };
         });
 
-        description = "Setup of xfs_quota projects. Make sure the filesystem is mounted with the pquota option.";
+        description = lib.mdDoc "Setup of xfs_quota projects. Make sure the filesystem is mounted with the pquota option.";
 
         example = {
           projname = {
diff --git a/nixos/modules/programs/xonsh.nix b/nixos/modules/programs/xonsh.nix
index 6e40db51cdb2f..3223761f93408 100644
--- a/nixos/modules/programs/xonsh.nix
+++ b/nixos/modules/programs/xonsh.nix
@@ -18,7 +18,7 @@ in
 
       enable = mkOption {
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to configure xonsh as an interactive shell.
         '';
         type = types.bool;
@@ -29,14 +29,14 @@ in
         default = pkgs.xonsh;
         defaultText = literalExpression "pkgs.xonsh";
         example = literalExpression "pkgs.xonsh.override { configFile = \"/path/to/xonshrc\"; }";
-        description = ''
+        description = lib.mdDoc ''
           xonsh package to use.
         '';
       };
 
       config = mkOption {
         default = "";
-        description = "Control file to customize your shell behavior.";
+        description = lib.mdDoc "Control file to customize your shell behavior.";
         type = types.lines;
       };
 
diff --git a/nixos/modules/programs/xss-lock.nix b/nixos/modules/programs/xss-lock.nix
index aba76133e5e33..c14c09721d6d1 100644
--- a/nixos/modules/programs/xss-lock.nix
+++ b/nixos/modules/programs/xss-lock.nix
@@ -14,16 +14,16 @@ in
       defaultText = literalExpression ''"''${pkgs.i3lock}/bin/i3lock"'';
       example = literalExpression ''"''${pkgs.i3lock-fancy}/bin/i3lock-fancy"'';
       type = types.separatedString " ";
-      description = "Locker to be used with xsslock";
+      description = lib.mdDoc "Locker to be used with xsslock";
     };
 
     extraOptions = mkOption {
       default = [ ];
       example = [ "--ignore-sleep" ];
       type = types.listOf types.str;
-      description = ''
+      description = lib.mdDoc ''
         Additional command-line arguments to pass to
-        <command>xss-lock</command>.
+        {command}`xss-lock`.
       '';
     };
   };
diff --git a/nixos/modules/programs/xwayland.nix b/nixos/modules/programs/xwayland.nix
index 3a8080fa4c4d8..9296116dca8ed 100644
--- a/nixos/modules/programs/xwayland.nix
+++ b/nixos/modules/programs/xwayland.nix
@@ -19,7 +19,7 @@ in
       defaultText = literalExpression ''
         optionalString config.fonts.fontDir.enable "/run/current-system/sw/share/X11/fonts"
       '';
-      description = ''
+      description = lib.mdDoc ''
         Default font path. Setting this option causes Xwayland to be rebuilt.
       '';
     };
@@ -34,7 +34,7 @@ in
           inherit (config.programs.xwayland) defaultFontPath;
         })
       '';
-      description = "The Xwayland package to use.";
+      description = lib.mdDoc "The Xwayland package to use.";
     };
 
   };
diff --git a/nixos/modules/programs/yabar.nix b/nixos/modules/programs/yabar.nix
index a8fac41e899c1..0ec668ada8eba 100644
--- a/nixos/modules/programs/yabar.nix
+++ b/nixos/modules/programs/yabar.nix
@@ -79,7 +79,7 @@ in
               example = "Droid Sans, FontAwesome Bold 9";
               type = types.str;
 
-              description = ''
+              description = lib.mdDoc ''
                 The font that will be used to draw the status bar.
               '';
             };
@@ -89,7 +89,7 @@ in
               example = "bottom";
               type = types.enum [ "top" "bottom" ];
 
-              description = ''
+              description = lib.mdDoc ''
                 The position where the bar will be rendered.
               '';
             };
@@ -98,7 +98,7 @@ in
               default = {};
               type = types.attrsOf types.str;
 
-              description = ''
+              description = lib.mdDoc ''
                 An attribute set which contains further attributes of a bar.
               '';
             };
@@ -109,7 +109,7 @@ in
                 options.exec = mkOption {
                   example = "YABAR_DATE";
                   type = types.str;
-                  description = ''
+                  description = lib.mdDoc ''
                      The type of the indicator to be executed.
                   '';
                 };
@@ -119,7 +119,7 @@ in
                   example = "right";
                   type = types.enum [ "left" "center" "right" ];
 
-                  description = ''
+                  description = lib.mdDoc ''
                     Whether to align the indicator at the left or right of the bar.
                   '';
                 };
@@ -128,20 +128,20 @@ in
                   default = {};
                   type = types.attrsOf (types.either types.str types.int);
 
-                  description = ''
+                  description = lib.mdDoc ''
                     An attribute set which contains further attributes of a indicator.
                   '';
                 };
               });
 
-              description = ''
+              description = lib.mdDoc ''
                 Indicators that should be rendered by yabar.
               '';
             };
           };
         });
 
-        description = ''
+        description = lib.mdDoc ''
           List of bars that should be rendered by yabar.
         '';
       };
diff --git a/nixos/modules/programs/zsh/oh-my-zsh.nix b/nixos/modules/programs/zsh/oh-my-zsh.nix
index 9d7622bd32873..b253b803edcc1 100644
--- a/nixos/modules/programs/zsh/oh-my-zsh.nix
+++ b/nixos/modules/programs/zsh/oh-my-zsh.nix
@@ -41,7 +41,7 @@ in
         enable = mkOption {
           type = types.bool;
           default = false;
-          description = ''
+          description = lib.mdDoc ''
             Enable oh-my-zsh.
           '';
         };
@@ -59,7 +59,7 @@ in
         plugins = mkOption {
           default = [];
           type = types.listOf(types.str);
-          description = ''
+          description = lib.mdDoc ''
             List of oh-my-zsh plugins
           '';
         };
@@ -84,7 +84,7 @@ in
         theme = mkOption {
           default = "";
           type = types.str;
-          description = ''
+          description = lib.mdDoc ''
             Name of the theme to be used by oh-my-zsh.
           '';
         };
diff --git a/nixos/modules/programs/zsh/zsh-autosuggestions.nix b/nixos/modules/programs/zsh/zsh-autosuggestions.nix
index 2e53e907d547a..b6c36a082e77c 100644
--- a/nixos/modules/programs/zsh/zsh-autosuggestions.nix
+++ b/nixos/modules/programs/zsh/zsh-autosuggestions.nix
@@ -17,7 +17,7 @@ in
     highlightStyle = mkOption {
       type = types.str;
       default = "fg=8"; # https://github.com/zsh-users/zsh-autosuggestions/tree/v0.4.3#suggestion-highlight-style
-      description = "Highlight style for suggestions ({fore,back}ground color)";
+      description = lib.mdDoc "Highlight style for suggestions ({fore,back}ground color)";
       example = "fg=cyan";
     };
 
@@ -40,14 +40,14 @@ in
     async = mkOption {
       type = types.bool;
       default = true;
-      description = "Whether to fetch suggestions asynchronously";
+      description = lib.mdDoc "Whether to fetch suggestions asynchronously";
       example = false;
     };
 
     extraConfig = mkOption {
       type = with types; attrsOf str;
       default = {};
-      description = "Attribute set with additional configuration values";
+      description = lib.mdDoc "Attribute set with additional configuration values";
       example = literalExpression ''
         {
           "ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE" = "20";
diff --git a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
index 1eb53ccae52be..37e1c2ebc384b 100644
--- a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
+++ b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix
@@ -30,7 +30,7 @@ in
           "line"
         ]));
 
-        description = ''
+        description = lib.mdDoc ''
           Specifies the highlighters to be used by zsh-syntax-highlighting.
 
           The following defined options can be found here:
@@ -48,7 +48,7 @@ in
           }
         '';
 
-        description = ''
+        description = lib.mdDoc ''
           Specifies custom patterns to be highlighted by zsh-syntax-highlighting.
 
           Please refer to the docs for more information about the usage:
@@ -65,7 +65,7 @@ in
           }
         '';
 
-        description = ''
+        description = lib.mdDoc ''
           Specifies custom styles to be highlighted by zsh-syntax-highlighting.
 
           Please refer to the docs for more information about the usage:
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix
index 5fe98b6801bbb..0c59d20fee467 100644
--- a/nixos/modules/programs/zsh/zsh.nix
+++ b/nixos/modules/programs/zsh/zsh.nix
@@ -44,27 +44,27 @@ in
 
       enable = mkOption {
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to configure zsh as an interactive shell. To enable zsh for
-          a particular user, use the <option>users.users.&lt;name?&gt;.shell</option>
+          a particular user, use the {option}`users.users.<name?>.shell`
           option for that user. To enable zsh system-wide use the
-          <option>users.defaultUserShell</option> option.
+          {option}`users.defaultUserShell` option.
         '';
         type = types.bool;
       };
 
       shellAliases = mkOption {
         default = { };
-        description = ''
-          Set of aliases for zsh shell, which overrides <option>environment.shellAliases</option>.
-          See <option>environment.shellAliases</option> for an option format description.
+        description = lib.mdDoc ''
+          Set of aliases for zsh shell, which overrides {option}`environment.shellAliases`.
+          See {option}`environment.shellAliases` for an option format description.
         '';
         type = with types; attrsOf (nullOr (either str path));
       };
 
       shellInit = mkOption {
         default = "";
-        description = ''
+        description = lib.mdDoc ''
           Shell script code called during zsh shell initialisation.
         '';
         type = types.lines;
@@ -72,7 +72,7 @@ in
 
       loginShellInit = mkOption {
         default = "";
-        description = ''
+        description = lib.mdDoc ''
           Shell script code called during zsh login shell initialisation.
         '';
         type = types.lines;
@@ -80,7 +80,7 @@ in
 
       interactiveShellInit = mkOption {
         default = "";
-        description = ''
+        description = lib.mdDoc ''
           Shell script code called during interactive zsh shell initialisation.
         '';
         type = types.lines;
@@ -94,7 +94,7 @@ in
           # a lot of different prompt variables.
           autoload -U promptinit && promptinit && prompt suse && setopt prompt_sp
         '';
-        description = ''
+        description = lib.mdDoc ''
           Shell script code used to initialise the zsh prompt.
         '';
         type = types.lines;
@@ -102,7 +102,7 @@ in
 
       histSize = mkOption {
         default = 2000;
-        description = ''
+        description = lib.mdDoc ''
           Change history size.
         '';
         type = types.int;
@@ -110,7 +110,7 @@ in
 
       histFile = mkOption {
         default = "$HOME/.zsh_history";
-        description = ''
+        description = lib.mdDoc ''
           Change history file.
         '';
         type = types.str;
@@ -124,15 +124,15 @@ in
           "HIST_FCNTL_LOCK"
         ];
         example = [ "EXTENDED_HISTORY" "RM_STAR_WAIT" ];
-        description = ''
+        description = lib.mdDoc ''
           Configure zsh options. See
-          <citerefentry><refentrytitle>zshoptions</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
+          {manpage}`zshoptions(1)`.
         '';
       };
 
       enableCompletion = mkOption {
         default = true;
-        description = ''
+        description = lib.mdDoc ''
           Enable zsh completion for all interactive zsh shells.
         '';
         type = types.bool;
@@ -140,7 +140,7 @@ in
 
       enableBashCompletion = mkOption {
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Enable compatibility with bash's programmable completion system.
         '';
         type = types.bool;
@@ -149,11 +149,11 @@ in
       enableGlobalCompInit = mkOption {
         default = cfg.enableCompletion;
         defaultText = literalExpression "config.${opt.enableCompletion}";
-        description = ''
+        description = lib.mdDoc ''
           Enable execution of compinit call for all interactive zsh shells.
 
           This option can be disabled if the user wants to extend its
-          <literal>fpath</literal> and a custom <literal>compinit</literal>
+          `fpath` and a custom `compinit`
           call in the local config is required.
         '';
         type = types.bool;