about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/hardware
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/hardware
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/hardware')
-rw-r--r--nixpkgs/nixos/modules/services/hardware/acpid.nix16
-rw-r--r--nixpkgs/nixos/modules/services/hardware/actkbd.nix14
-rw-r--r--nixpkgs/nixos/modules/services/hardware/argonone.nix4
-rw-r--r--nixpkgs/nixos/modules/services/hardware/asusd.nix16
-rw-r--r--nixpkgs/nixos/modules/services/hardware/auto-cpufreq.nix4
-rw-r--r--nixpkgs/nixos/modules/services/hardware/auto-epp.nix8
-rw-r--r--nixpkgs/nixos/modules/services/hardware/bluetooth.nix14
-rw-r--r--nixpkgs/nixos/modules/services/hardware/bolt.nix2
-rw-r--r--nixpkgs/nixos/modules/services/hardware/brltty.nix2
-rw-r--r--nixpkgs/nixos/modules/services/hardware/ddccontrol.nix2
-rw-r--r--nixpkgs/nixos/modules/services/hardware/fancontrol.nix4
-rw-r--r--nixpkgs/nixos/modules/services/hardware/freefall.nix4
-rw-r--r--nixpkgs/nixos/modules/services/hardware/fwupd.nix18
-rw-r--r--nixpkgs/nixos/modules/services/hardware/handheld-daemon.nix2
-rw-r--r--nixpkgs/nixos/modules/services/hardware/hddfancontrol.nix10
-rw-r--r--nixpkgs/nixos/modules/services/hardware/illum.nix2
-rw-r--r--nixpkgs/nixos/modules/services/hardware/interception-tools.nix6
-rw-r--r--nixpkgs/nixos/modules/services/hardware/iptsd.nix10
-rw-r--r--nixpkgs/nixos/modules/services/hardware/irqbalance.nix2
-rw-r--r--nixpkgs/nixos/modules/services/hardware/joycond.nix2
-rw-r--r--nixpkgs/nixos/modules/services/hardware/kanata.nix14
-rw-r--r--nixpkgs/nixos/modules/services/hardware/keyd.nix10
-rw-r--r--nixpkgs/nixos/modules/services/hardware/lcd.nix24
-rw-r--r--nixpkgs/nixos/modules/services/hardware/libinput.nix295
-rw-r--r--nixpkgs/nixos/modules/services/hardware/lirc.nix8
-rw-r--r--nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/cdi-generate.nix60
-rw-r--r--nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/default.nix40
-rw-r--r--nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix35
-rw-r--r--nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix127
-rw-r--r--nixpkgs/nixos/modules/services/hardware/nvidia-optimus.nix2
-rw-r--r--nixpkgs/nixos/modules/services/hardware/openrgb.nix6
-rw-r--r--nixpkgs/nixos/modules/services/hardware/pcscd.nix8
-rw-r--r--nixpkgs/nixos/modules/services/hardware/pommed.nix4
-rw-r--r--nixpkgs/nixos/modules/services/hardware/power-profiles-daemon.nix2
-rw-r--r--nixpkgs/nixos/modules/services/hardware/rasdaemon.nix14
-rw-r--r--nixpkgs/nixos/modules/services/hardware/ratbagd.nix2
-rw-r--r--nixpkgs/nixos/modules/services/hardware/sane.nix22
-rw-r--r--nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix14
-rw-r--r--nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix12
-rw-r--r--nixpkgs/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix4
-rw-r--r--nixpkgs/nixos/modules/services/hardware/spacenavd.nix2
-rw-r--r--nixpkgs/nixos/modules/services/hardware/supergfxd.nix4
-rw-r--r--nixpkgs/nixos/modules/services/hardware/tcsd.nix18
-rw-r--r--nixpkgs/nixos/modules/services/hardware/thermald.nix8
-rw-r--r--nixpkgs/nixos/modules/services/hardware/thinkfan.nix22
-rw-r--r--nixpkgs/nixos/modules/services/hardware/throttled.nix4
-rw-r--r--nixpkgs/nixos/modules/services/hardware/tlp.nix6
-rw-r--r--nixpkgs/nixos/modules/services/hardware/trezord.nix6
-rw-r--r--nixpkgs/nixos/modules/services/hardware/triggerhappy.nix14
-rw-r--r--nixpkgs/nixos/modules/services/hardware/tuxedo-rs.nix4
-rw-r--r--nixpkgs/nixos/modules/services/hardware/udev.nix68
-rw-r--r--nixpkgs/nixos/modules/services/hardware/udisks2.nix6
-rw-r--r--nixpkgs/nixos/modules/services/hardware/undervolt.nix34
-rw-r--r--nixpkgs/nixos/modules/services/hardware/upower.nix24
-rw-r--r--nixpkgs/nixos/modules/services/hardware/usbmuxd.nix8
-rw-r--r--nixpkgs/nixos/modules/services/hardware/usbrelayd.nix6
-rw-r--r--nixpkgs/nixos/modules/services/hardware/vdr.nix14
57 files changed, 724 insertions, 369 deletions
diff --git a/nixpkgs/nixos/modules/services/hardware/acpid.nix b/nixpkgs/nixos/modules/services/hardware/acpid.nix
index 821f4ef205fc..581b6cb40136 100644
--- a/nixpkgs/nixos/modules/services/hardware/acpid.nix
+++ b/nixpkgs/nixos/modules/services/hardware/acpid.nix
@@ -48,12 +48,12 @@ in
 
     services.acpid = {
 
-      enable = mkEnableOption (lib.mdDoc "the ACPI daemon");
+      enable = mkEnableOption "the ACPI daemon";
 
       logEvents = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Log all event activity.";
+        description = "Log all event activity.";
       };
 
       handlers = mkOption {
@@ -62,17 +62,17 @@ in
             event = mkOption {
               type = types.str;
               example = literalExpression ''"button/power.*" "button/lid.*" "ac_adapter.*" "button/mute.*" "button/volumedown.*" "cd/play.*" "cd/next.*"'';
-              description = lib.mdDoc "Event type.";
+              description = "Event type.";
             };
 
             action = mkOption {
               type = types.lines;
-              description = lib.mdDoc "Shell commands to execute when the event is triggered.";
+              description = "Shell commands to execute when the event is triggered.";
             };
           };
         });
 
-        description = lib.mdDoc ''
+        description = ''
           Event handlers.
 
           ::: {.note}
@@ -104,19 +104,19 @@ in
       powerEventCommands = mkOption {
         type = types.lines;
         default = "";
-        description = lib.mdDoc "Shell commands to execute on a button/power.* event.";
+        description = "Shell commands to execute on a button/power.* event.";
       };
 
       lidEventCommands = mkOption {
         type = types.lines;
         default = "";
-        description = lib.mdDoc "Shell commands to execute on a button/lid.* event.";
+        description = "Shell commands to execute on a button/lid.* event.";
       };
 
       acEventCommands = mkOption {
         type = types.lines;
         default = "";
-        description = lib.mdDoc "Shell commands to execute on an ac_adapter.* event.";
+        description = "Shell commands to execute on an ac_adapter.* event.";
       };
 
     };
diff --git a/nixpkgs/nixos/modules/services/hardware/actkbd.nix b/nixpkgs/nixos/modules/services/hardware/actkbd.nix
index 1718d179bf5e..335e9b2fdf5a 100644
--- a/nixpkgs/nixos/modules/services/hardware/actkbd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/actkbd.nix
@@ -20,25 +20,25 @@ let
 
       keys = mkOption {
         type = types.listOf types.int;
-        description = lib.mdDoc "List of keycodes to match.";
+        description = "List of keycodes to match.";
       };
 
       events = mkOption {
         type = types.listOf (types.enum ["key" "rep" "rel"]);
         default = [ "key" ];
-        description = lib.mdDoc "List of events to match.";
+        description = "List of events to match.";
       };
 
       attributes = mkOption {
         type = types.listOf types.str;
         default = [ "exec" ];
-        description = lib.mdDoc "List of attributes.";
+        description = "List of attributes.";
       };
 
       command = mkOption {
         type = types.str;
         default = "";
-        description = lib.mdDoc "What to run.";
+        description = "What to run.";
       };
 
     };
@@ -57,7 +57,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable the {command}`actkbd` key mapping daemon.
 
           Turning this on will start an {command}`actkbd`
@@ -78,7 +78,7 @@ in
           [ { keys = [ 113 ]; events = [ "key" ]; command = "''${pkgs.alsa-utils}/bin/amixer -q set Master toggle"; }
           ]
         '';
-        description = lib.mdDoc ''
+        description = ''
           Key bindings for {command}`actkbd`.
 
           See {command}`actkbd` {file}`README` for documentation.
@@ -90,7 +90,7 @@ in
       extraConfig = mkOption {
         type = types.lines;
         default = "";
-        description = lib.mdDoc ''
+        description = ''
           Literal contents to append to the end of actkbd configuration file.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/hardware/argonone.nix b/nixpkgs/nixos/modules/services/hardware/argonone.nix
index e67c2625062e..b767388128c8 100644
--- a/nixpkgs/nixos/modules/services/hardware/argonone.nix
+++ b/nixpkgs/nixos/modules/services/hardware/argonone.nix
@@ -5,12 +5,12 @@ let
 in
 {
   options.services.hardware.argonone = {
-    enable = lib.mkEnableOption (lib.mdDoc "the driver for Argon One Raspberry Pi case fan and power button");
+    enable = lib.mkEnableOption "the driver for Argon One Raspberry Pi case fan and power button";
     package = lib.mkOption {
       type = lib.types.package;
       default = pkgs.argononed;
       defaultText = lib.literalExpression "pkgs.argononed";
-      description = lib.mdDoc ''
+      description = ''
         The package implementing the Argon One driver
       '';
     };
diff --git a/nixpkgs/nixos/modules/services/hardware/asusd.nix b/nixpkgs/nixos/modules/services/hardware/asusd.nix
index ff9a751e5be8..2dfe761a2172 100644
--- a/nixpkgs/nixos/modules/services/hardware/asusd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/asusd.nix
@@ -6,14 +6,14 @@ in
 {
   options = {
     services.asusd = {
-      enable = lib.mkEnableOption (lib.mdDoc "the asusd service for ASUS ROG laptops");
+      enable = lib.mkEnableOption "the asusd service for ASUS ROG laptops";
 
       package = lib.mkPackageOption pkgs "asusctl" { };
 
       enableUserService = lib.mkOption {
         type = lib.types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Activate the asusd-user service.
         '';
       };
@@ -21,7 +21,7 @@ in
       animeConfig = lib.mkOption {
         type = lib.types.nullOr lib.types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The content of /etc/asusd/anime.ron.
           See https://asus-linux.org/asusctl/#anime-control.
         '';
@@ -30,7 +30,7 @@ in
       asusdConfig = lib.mkOption {
         type = lib.types.nullOr lib.types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The content of /etc/asusd/asusd.ron.
           See https://asus-linux.org/asusctl/.
         '';
@@ -39,7 +39,7 @@ in
       auraConfig = lib.mkOption {
         type = lib.types.nullOr lib.types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The content of /etc/asusd/aura.ron.
           See https://asus-linux.org/asusctl/#led-keyboard-control.
         '';
@@ -48,7 +48,7 @@ in
       profileConfig = lib.mkOption {
         type = lib.types.nullOr lib.types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The content of /etc/asusd/profile.ron.
           See https://asus-linux.org/asusctl/#profiles.
         '';
@@ -57,7 +57,7 @@ in
       fanCurvesConfig = lib.mkOption {
       type = lib.types.nullOr lib.types.str;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
           The content of /etc/asusd/fan_curves.ron.
           See https://asus-linux.org/asusctl/#fan-curves.
         '';
@@ -66,7 +66,7 @@ in
       userLedModesConfig = lib.mkOption {
         type = lib.types.nullOr lib.types.str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The content of /etc/asusd/asusd-user-ledmodes.ron.
           See https://asus-linux.org/asusctl/#led-keyboard-control.
         '';
diff --git a/nixpkgs/nixos/modules/services/hardware/auto-cpufreq.nix b/nixpkgs/nixos/modules/services/hardware/auto-cpufreq.nix
index 9c69ba8920f3..f61fa38be175 100644
--- a/nixpkgs/nixos/modules/services/hardware/auto-cpufreq.nix
+++ b/nixpkgs/nixos/modules/services/hardware/auto-cpufreq.nix
@@ -9,10 +9,10 @@ let
 in {
   options = {
     services.auto-cpufreq = {
-      enable = mkEnableOption (lib.mdDoc "auto-cpufreq daemon");
+      enable = mkEnableOption "auto-cpufreq daemon";
 
       settings = mkOption {
-        description = lib.mdDoc ''
+        description = ''
           Configuration for `auto-cpufreq`.
 
           The available options can be found in [the example configuration file](https://github.com/AdnanHodzic/auto-cpufreq/blob/v${pkgs.auto-cpufreq.version}/auto-cpufreq.conf-example).
diff --git a/nixpkgs/nixos/modules/services/hardware/auto-epp.nix b/nixpkgs/nixos/modules/services/hardware/auto-epp.nix
index 84b6a337d28a..b568dec26f4c 100644
--- a/nixpkgs/nixos/modules/services/hardware/auto-epp.nix
+++ b/nixpkgs/nixos/modules/services/hardware/auto-epp.nix
@@ -8,7 +8,7 @@ let
 in {
   options = {
     services.auto-epp = {
-      enable = lib.mkEnableOption (lib.mdDoc "auto-epp for amd active pstate");
+      enable = lib.mkEnableOption "auto-epp for amd active pstate";
 
       package = lib.mkPackageOptionMD pkgs "auto-epp" {};
 
@@ -20,7 +20,7 @@ in {
               epp_state_for_AC = mkOption {
                 type = types.str;
                 default = "balance_performance";
-                description = lib.mdDoc ''
+                description = ''
                   energy_performance_preference when on plugged in
 
                   ::: {.note}
@@ -33,7 +33,7 @@ in {
               epp_state_for_BAT = mkOption {
                 type = types.str;
                 default = "power";
-                description = lib.mdDoc ''
+                description = ''
                   `energy_performance_preference` when on battery
 
                   ::: {.note}
@@ -46,7 +46,7 @@ in {
           };
         };
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           Settings for the auto-epp application.
           See upstream example: <https://github.com/jothi-prasath/auto-epp/blob/master/sample-auto-epp.conf>
         '';
diff --git a/nixpkgs/nixos/modules/services/hardware/bluetooth.nix b/nixpkgs/nixos/modules/services/hardware/bluetooth.nix
index 51ec12f96537..a73cc970576a 100644
--- a/nixpkgs/nixos/modules/services/hardware/bluetooth.nix
+++ b/nixpkgs/nixos/modules/services/hardware/bluetooth.nix
@@ -36,14 +36,14 @@ in
   options = {
 
     hardware.bluetooth = {
-      enable = mkEnableOption (lib.mdDoc "support for Bluetooth");
+      enable = mkEnableOption "support for Bluetooth";
 
-      hsphfpd.enable = mkEnableOption (lib.mdDoc "support for hsphfpd[-prototype] implementation");
+      hsphfpd.enable = mkEnableOption "support for hsphfpd[-prototype] implementation";
 
       powerOnBoot = mkOption {
         type = types.bool;
         default = true;
-        description = lib.mdDoc "Whether to power up the default Bluetooth controller on boot.";
+        description = "Whether to power up the default Bluetooth controller on boot.";
       };
 
       package = mkPackageOption pkgs "bluez" { };
@@ -51,7 +51,7 @@ in
       disabledPlugins = mkOption {
         type = types.listOf types.str;
         default = [ ];
-        description = lib.mdDoc "Built-in plugins to disable";
+        description = "Built-in plugins to disable";
       };
 
       settings = mkOption {
@@ -62,7 +62,7 @@ in
             ControllerMode = "bredr";
           };
         };
-        description = lib.mdDoc "Set configuration for system-wide bluetooth (/etc/bluetooth/main.conf).";
+        description = "Set configuration for system-wide bluetooth (/etc/bluetooth/main.conf).";
       };
 
       input = mkOption {
@@ -74,7 +74,7 @@ in
             ClassicBondedOnly = true;
           };
         };
-        description = lib.mdDoc "Set configuration for the input service (/etc/bluetooth/input.conf).";
+        description = "Set configuration for the input service (/etc/bluetooth/input.conf).";
       };
 
       network = mkOption {
@@ -85,7 +85,7 @@ in
             DisableSecurity = true;
           };
         };
-        description = lib.mdDoc "Set configuration for the network service (/etc/bluetooth/network.conf).";
+        description = "Set configuration for the network service (/etc/bluetooth/network.conf).";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/hardware/bolt.nix b/nixpkgs/nixos/modules/services/hardware/bolt.nix
index 3bdf67cc1758..729273f94f12 100644
--- a/nixpkgs/nixos/modules/services/hardware/bolt.nix
+++ b/nixpkgs/nixos/modules/services/hardware/bolt.nix
@@ -11,7 +11,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable Bolt, a userspace daemon to enable
           security levels for Thunderbolt 3 on GNU/Linux.
 
diff --git a/nixpkgs/nixos/modules/services/hardware/brltty.nix b/nixpkgs/nixos/modules/services/hardware/brltty.nix
index f96760e92c57..bdec5d79be96 100644
--- a/nixpkgs/nixos/modules/services/hardware/brltty.nix
+++ b/nixpkgs/nixos/modules/services/hardware/brltty.nix
@@ -25,7 +25,7 @@ in {
     services.brltty.enable = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Whether to enable the BRLTTY daemon.";
+      description = "Whether to enable the BRLTTY daemon.";
     };
 
   };
diff --git a/nixpkgs/nixos/modules/services/hardware/ddccontrol.nix b/nixpkgs/nixos/modules/services/hardware/ddccontrol.nix
index 0f1e8bf0d26c..f0b5a9c81960 100644
--- a/nixpkgs/nixos/modules/services/hardware/ddccontrol.nix
+++ b/nixpkgs/nixos/modules/services/hardware/ddccontrol.nix
@@ -13,7 +13,7 @@ in
 
   options = {
     services.ddccontrol = {
-      enable = lib.mkEnableOption (lib.mdDoc "ddccontrol for controlling displays");
+      enable = lib.mkEnableOption "ddccontrol for controlling displays";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/hardware/fancontrol.nix b/nixpkgs/nixos/modules/services/hardware/fancontrol.nix
index 993c37b2364f..f9fc8593f852 100644
--- a/nixpkgs/nixos/modules/services/hardware/fancontrol.nix
+++ b/nixpkgs/nixos/modules/services/hardware/fancontrol.nix
@@ -9,11 +9,11 @@ let
 in
 {
   options.hardware.fancontrol = {
-    enable = mkEnableOption (lib.mdDoc "software fan control (requires fancontrol.config)");
+    enable = mkEnableOption "software fan control (requires fancontrol.config)";
 
     config = mkOption {
       type = types.lines;
-      description = lib.mdDoc "Required fancontrol configuration file content. See {manpage}`pwmconfig(8)` from the lm_sensors package.";
+      description = "Required fancontrol configuration file content. See {manpage}`pwmconfig(8)` from the lm_sensors package.";
       example = ''
         # Configuration file generated by pwmconfig
         INTERVAL=10
diff --git a/nixpkgs/nixos/modules/services/hardware/freefall.nix b/nixpkgs/nixos/modules/services/hardware/freefall.nix
index 2985739bc2df..4ac7c54d4d8a 100644
--- a/nixpkgs/nixos/modules/services/hardware/freefall.nix
+++ b/nixpkgs/nixos/modules/services/hardware/freefall.nix
@@ -13,7 +13,7 @@ in {
     enable = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Whether to protect HP/Dell laptop hard drives (not SSDs) in free fall.
       '';
     };
@@ -23,7 +23,7 @@ in {
     devices = mkOption {
       type = types.listOf types.str;
       default = [ "/dev/sda" ];
-      description = lib.mdDoc ''
+      description = ''
         Device paths to all internal spinning hard drives.
       '';
     };
diff --git a/nixpkgs/nixos/modules/services/hardware/fwupd.nix b/nixpkgs/nixos/modules/services/hardware/fwupd.nix
index c4837ff80ec7..bdbd0ac2440b 100644
--- a/nixpkgs/nixos/modules/services/hardware/fwupd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/fwupd.nix
@@ -64,7 +64,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable fwupd, a DBus service that allows
           applications to update firmware.
         '';
@@ -74,7 +74,7 @@ in {
         type = types.listOf types.path;
         default = [];
         example = literalExpression "[ /etc/nixos/fwupd/myfirmware.pem ]";
-        description = lib.mdDoc ''
+        description = ''
           Installing a public key allows firmware signed with a matching private key to be recognized as trusted, which may require less authentication to install than for untrusted files. By default trusted firmware can be upgraded (but not downgraded) without the user or administrator password. Only very few keys are installed by default.
         '';
       };
@@ -83,7 +83,7 @@ in {
         type = with types; listOf str;
         default = [];
         example = [ "lvfs-testing" ];
-        description = lib.mdDoc ''
+        description = ''
           Enables extra remotes in fwupd. See `/etc/fwupd/remotes.d`.
         '';
       };
@@ -98,7 +98,7 @@ in {
               type = types.listOf types.str;
               default = [];
               example = [ "2082b5e0-7a64-478a-b1b2-e3404fab6dad" ];
-              description = lib.mdDoc ''
+              description = ''
                 List of device GUIDs to be disabled.
               '';
             };
@@ -107,7 +107,7 @@ in {
               type = types.listOf types.str;
               default = [];
               example = [ "udev" ];
-              description = lib.mdDoc ''
+              description = ''
                 List of plugins to be disabled.
               '';
             };
@@ -116,7 +116,7 @@ in {
               type = types.path;
               default = config.boot.loader.efi.efiSysMountPoint;
               defaultText = lib.literalExpression "config.boot.loader.efi.efiSysMountPoint";
-              description = lib.mdDoc ''
+              description = ''
                 The EFI system partition (ESP) path used if UDisks is not available
                 or if this partition is not mounted at /boot/efi, /boot, or /efi
               '';
@@ -126,7 +126,7 @@ in {
               internal = true;
               type = types.bool;
               default = false;
-              description = lib.mdDoc ''
+              description = ''
                 Create virtual test devices and remote for validating daemon flows.
                 This is only intended for CI testing and development purposes.
               '';
@@ -134,7 +134,7 @@ in {
           };
         };
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           Configurations for the fwupd daemon.
         '';
       };
@@ -144,7 +144,7 @@ in {
           freeformType = format.type.nestedTypes.elemType;
         };
         default = {};
-        description = lib.mdDoc ''
+        description = ''
           UEFI capsule configurations for the fwupd daemon.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/hardware/handheld-daemon.nix b/nixpkgs/nixos/modules/services/hardware/handheld-daemon.nix
index e8a7a39f441d..6c9d5aa3e22c 100644
--- a/nixpkgs/nixos/modules/services/hardware/handheld-daemon.nix
+++ b/nixpkgs/nixos/modules/services/hardware/handheld-daemon.nix
@@ -13,7 +13,7 @@ in
 
     user = mkOption {
       type = types.str;
-      description = lib.mdDoc ''
+      description = ''
         The user to run Handheld Daemon with.
       '';
     };
diff --git a/nixpkgs/nixos/modules/services/hardware/hddfancontrol.nix b/nixpkgs/nixos/modules/services/hardware/hddfancontrol.nix
index 746154e7aa17..e8cab0e22bef 100644
--- a/nixpkgs/nixos/modules/services/hardware/hddfancontrol.nix
+++ b/nixpkgs/nixos/modules/services/hardware/hddfancontrol.nix
@@ -8,12 +8,12 @@ in
 {
   options = {
 
-    services.hddfancontrol.enable = lib.mkEnableOption (lib.mdDoc "hddfancontrol daemon");
+    services.hddfancontrol.enable = lib.mkEnableOption "hddfancontrol daemon";
 
     services.hddfancontrol.disks = lib.mkOption {
       type = with types; listOf path;
       default = [];
-      description = lib.mdDoc ''
+      description = ''
         Drive(s) to get temperature from
       '';
       example = ["/dev/sda"];
@@ -22,7 +22,7 @@ in
     services.hddfancontrol.pwmPaths = lib.mkOption {
       type = with types; listOf path;
       default = [];
-      description = lib.mdDoc ''
+      description = ''
         PWM filepath(s) to control fan speed (under /sys)
       '';
       example = ["/sys/class/hwmon/hwmon2/pwm1"];
@@ -31,7 +31,7 @@ in
     services.hddfancontrol.smartctl = lib.mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Probe temperature using smartctl instead of hddtemp or hdparm
       '';
     };
@@ -39,7 +39,7 @@ in
     services.hddfancontrol.extraArgs = lib.mkOption {
       type = with types; listOf str;
       default = [];
-      description = lib.mdDoc ''
+      description = ''
         Extra commandline arguments for hddfancontrol
       '';
       example = ["--pwm-start-value=32"
diff --git a/nixpkgs/nixos/modules/services/hardware/illum.nix b/nixpkgs/nixos/modules/services/hardware/illum.nix
index 46172fb7b53a..7f7a85000234 100644
--- a/nixpkgs/nixos/modules/services/hardware/illum.nix
+++ b/nixpkgs/nixos/modules/services/hardware/illum.nix
@@ -13,7 +13,7 @@ in {
       enable = mkOption {
         default = false;
         type = types.bool;
-        description = lib.mdDoc ''
+        description = ''
           Enable illum, a daemon for controlling screen brightness with brightness buttons.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/hardware/interception-tools.nix b/nixpkgs/nixos/modules/services/hardware/interception-tools.nix
index 4f86bd470ea7..e69c05841ee0 100644
--- a/nixpkgs/nixos/modules/services/hardware/interception-tools.nix
+++ b/nixpkgs/nixos/modules/services/hardware/interception-tools.nix
@@ -9,14 +9,14 @@ in {
     enable = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Whether to enable the interception tools service.";
+      description = "Whether to enable the interception tools service.";
     };
 
     plugins = mkOption {
       type = types.listOf types.package;
       default = [ pkgs.interception-tools-plugins.caps2esc ];
       defaultText = literalExpression "[ pkgs.interception-tools-plugins.caps2esc ]";
-      description = lib.mdDoc ''
+      description = ''
         A list of interception tools plugins that will be made available to use
         inside the udevmon configuration.
       '';
@@ -36,7 +36,7 @@ in {
             EVENTS:
               EV_KEY: [KEY_X, KEY_Y]
       '';
-      description = lib.mdDoc ''
+      description = ''
         String of udevmon YAML configuration, or path to a udevmon YAML
         configuration file.
       '';
diff --git a/nixpkgs/nixos/modules/services/hardware/iptsd.nix b/nixpkgs/nixos/modules/services/hardware/iptsd.nix
index 8af0a6d6bbe1..3a299c2428df 100644
--- a/nixpkgs/nixos/modules/services/hardware/iptsd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/iptsd.nix
@@ -6,11 +6,11 @@ let
   configFile = format.generate "iptsd.conf" cfg.config;
 in {
   options.services.iptsd = {
-    enable = lib.mkEnableOption (lib.mdDoc "the userspace daemon for Intel Precise Touch & Stylus");
+    enable = lib.mkEnableOption "the userspace daemon for Intel Precise Touch & Stylus";
 
     config = lib.mkOption {
       default = { };
-      description = lib.mdDoc ''
+      description = ''
         Configuration for IPTSD. See the
         [reference configuration](https://github.com/linux-surface/iptsd/blob/master/etc/iptsd.conf)
         for available options and defaults.
@@ -21,19 +21,19 @@ in {
           Touch = {
             DisableOnPalm = lib.mkOption {
               default = false;
-              description = lib.mdDoc "Ignore all touch inputs if a palm was registered on the display.";
+              description = "Ignore all touch inputs if a palm was registered on the display.";
               type = lib.types.bool;
             };
             DisableOnStylus = lib.mkOption {
               default = false;
-              description = lib.mdDoc "Ignore all touch inputs if a stylus is in proximity.";
+              description = "Ignore all touch inputs if a stylus is in proximity.";
               type = lib.types.bool;
             };
           };
           Stylus = {
             Disable = lib.mkOption {
               default = false;
-              description = lib.mdDoc "Disables the stylus. No stylus data will be processed.";
+              description = "Disables the stylus. No stylus data will be processed.";
               type = lib.types.bool;
             };
           };
diff --git a/nixpkgs/nixos/modules/services/hardware/irqbalance.nix b/nixpkgs/nixos/modules/services/hardware/irqbalance.nix
index 8ba0a73d895d..c79e0eb83ece 100644
--- a/nixpkgs/nixos/modules/services/hardware/irqbalance.nix
+++ b/nixpkgs/nixos/modules/services/hardware/irqbalance.nix
@@ -9,7 +9,7 @@ let
 
 in
 {
-  options.services.irqbalance.enable = mkEnableOption (lib.mdDoc "irqbalance daemon");
+  options.services.irqbalance.enable = mkEnableOption "irqbalance daemon";
 
   config = mkIf cfg.enable {
 
diff --git a/nixpkgs/nixos/modules/services/hardware/joycond.nix b/nixpkgs/nixos/modules/services/hardware/joycond.nix
index 060303b520e5..106c19243c49 100644
--- a/nixpkgs/nixos/modules/services/hardware/joycond.nix
+++ b/nixpkgs/nixos/modules/services/hardware/joycond.nix
@@ -8,7 +8,7 @@ with lib;
 
 {
   options.services.joycond = {
-    enable = mkEnableOption (lib.mdDoc "support for Nintendo Pro Controllers and Joycons");
+    enable = mkEnableOption "support for Nintendo Pro Controllers and Joycons";
 
     package = mkPackageOption pkgs "joycond" { };
   };
diff --git a/nixpkgs/nixos/modules/services/hardware/kanata.nix b/nixpkgs/nixos/modules/services/hardware/kanata.nix
index 05e76d843215..333b2d2a88a5 100644
--- a/nixpkgs/nixos/modules/services/hardware/kanata.nix
+++ b/nixpkgs/nixos/modules/services/hardware/kanata.nix
@@ -11,7 +11,7 @@ let
         type = types.listOf types.str;
         default = [ ];
         example = [ "/dev/input/by-id/usb-0000_0000-event-kbd" ];
-        description = mdDoc ''
+        description = ''
           Paths to keyboard devices.
 
           An empty list, the default value, lets kanata detect which
@@ -39,7 +39,7 @@ let
             ;; tap within 100ms for capslk, hold more than 100ms for lctl
             cap (tap-hold 100 100 caps lctl))
         '';
-        description = mdDoc ''
+        description = ''
           Configuration other than `defcfg`.
 
           See [example config files](https://github.com/jtroo/kanata)
@@ -50,7 +50,7 @@ let
         type = types.lines;
         default = "";
         example = "danger-enable-cmd yes";
-        description = mdDoc ''
+        description = ''
           Configuration of `defcfg` other than `linux-dev` (generated
           from the devices option) and
           `linux-continue-if-no-devs-found` (hardcoded to be yes).
@@ -62,13 +62,13 @@ let
       extraArgs = mkOption {
         type = types.listOf types.str;
         default = [ ];
-        description = mdDoc "Extra command line arguments passed to kanata.";
+        description = "Extra command line arguments passed to kanata.";
       };
       port = mkOption {
         type = types.nullOr types.port;
         default = null;
         example = 6666;
-        description = mdDoc ''
+        description = ''
           Port to run the TCP server on. `null` will not run the server.
         '';
       };
@@ -151,7 +151,7 @@ let
 in
 {
   options.services.kanata = {
-    enable = mkEnableOption (mdDoc "kanata");
+    enable = mkEnableOption "kanata, a tool to improve keyboard comfort and usability with advanced customization";
     package = mkPackageOption pkgs "kanata" {
       example = "kanata-with-cmd";
       extraDescription = ''
@@ -164,7 +164,7 @@ in
     keyboards = mkOption {
       type = types.attrsOf (types.submodule keyboard);
       default = { };
-      description = mdDoc "Keyboard configurations.";
+      description = "Keyboard configurations.";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/hardware/keyd.nix b/nixpkgs/nixos/modules/services/hardware/keyd.nix
index 77297401a51c..2aee7817c6f3 100644
--- a/nixpkgs/nixos/modules/services/hardware/keyd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/keyd.nix
@@ -9,7 +9,7 @@ let
         type = types.listOf types.str;
         default = [ "*" ];
         example = [ "*" "-0123:0456" ];
-        description = lib.mdDoc ''
+        description = ''
           Device identifiers, as shown by {manpage}`keyd(1)`.
         '';
       };
@@ -30,7 +30,7 @@ let
             l = "right";
           };
         };
-        description = lib.mdDoc ''
+        description = ''
           Configuration, except `ids` section, that is written to {file}`/etc/keyd/<keyboard>.conf`.
           Appropriate names can be used to write non-alpha keys, for example "equal" instead of "=" sign (see <https://github.com/NixOS/nixpkgs/issues/236622>).
           See <https://github.com/rvaiya/keyd> how to configure.
@@ -44,7 +44,7 @@ let
           [control+shift]
           h = left
         '';
-        description = lib.mdDoc ''
+        description = ''
           Extra configuration that is appended to the end of the file.
           **Do not** write `ids` section here, use a separate option for it.
           You can use this option to define compound layers that must always be defined after the layer they are comprised.
@@ -62,7 +62,7 @@ in
   ];
 
   options.services.keyd = {
-    enable = mkEnableOption (lib.mdDoc "keyd, a key remapping daemon");
+    enable = mkEnableOption "keyd, a key remapping daemon";
 
     keyboards = mkOption {
       type = types.attrsOf (types.submodule keyboardOptions);
@@ -87,7 +87,7 @@ in
           };
         }
       '';
-      description = mdDoc ''
+      description = ''
         Configuration for one or more device IDs. Corresponding files in the /etc/keyd/ directory are created according to the name of the keys (like `default` or `externalKeyboard`).
       '';
     };
diff --git a/nixpkgs/nixos/modules/services/hardware/lcd.nix b/nixpkgs/nixos/modules/services/hardware/lcd.nix
index 8d682d137f44..d52d5f391911 100644
--- a/nixpkgs/nixos/modules/services/hardware/lcd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/lcd.nix
@@ -36,32 +36,32 @@ in with lib; {
       serverHost = mkOption {
         type = str;
         default = "localhost";
-        description = lib.mdDoc "Host on which LCDd is listening.";
+        description = "Host on which LCDd is listening.";
       };
 
       serverPort = mkOption {
         type = int;
         default = 13666;
-        description = lib.mdDoc "Port on which LCDd is listening.";
+        description = "Port on which LCDd is listening.";
       };
 
       server = {
         enable = mkOption {
           type = bool;
           default = false;
-          description = lib.mdDoc "Enable the LCD panel server (LCDd)";
+          description = "Enable the LCD panel server (LCDd)";
         };
 
         openPorts = mkOption {
           type = bool;
           default = false;
-          description = lib.mdDoc "Open the ports in the firewall";
+          description = "Open the ports in the firewall";
         };
 
         usbPermissions = mkOption {
           type = bool;
           default = false;
-          description = lib.mdDoc ''
+          description = ''
             Set group-write permissions on a USB device.
 
             A USB connected LCD panel will most likely require having its
@@ -83,25 +83,25 @@ in with lib; {
         usbVid = mkOption {
           type = str;
           default = "";
-          description = lib.mdDoc "The vendor ID of the USB device to claim.";
+          description = "The vendor ID of the USB device to claim.";
         };
 
         usbPid = mkOption {
           type = str;
           default = "";
-          description = lib.mdDoc "The product ID of the USB device to claim.";
+          description = "The product ID of the USB device to claim.";
         };
 
         usbGroup = mkOption {
           type = str;
           default = "dialout";
-          description = lib.mdDoc "The group to use for settings permissions. This group must exist or you will have to create it.";
+          description = "The group to use for settings permissions. This group must exist or you will have to create it.";
         };
 
         extraConfig = mkOption {
           type = lines;
           default = "";
-          description = lib.mdDoc "Additional configuration added verbatim to the server config.";
+          description = "Additional configuration added verbatim to the server config.";
         };
       };
 
@@ -109,19 +109,19 @@ in with lib; {
         enable = mkOption {
           type = bool;
           default = false;
-          description = lib.mdDoc "Enable the LCD panel client (LCDproc)";
+          description = "Enable the LCD panel client (LCDproc)";
         };
 
         extraConfig = mkOption {
           type = lines;
           default = "";
-          description = lib.mdDoc "Additional configuration added verbatim to the client config.";
+          description = "Additional configuration added verbatim to the client config.";
         };
 
         restartForever = mkOption {
           type = bool;
           default = true;
-          description = lib.mdDoc "Try restarting the client forever.";
+          description = "Try restarting the client forever.";
         };
       };
     };
diff --git a/nixpkgs/nixos/modules/services/hardware/libinput.nix b/nixpkgs/nixos/modules/services/hardware/libinput.nix
new file mode 100644
index 000000000000..b8aa59035d33
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/hardware/libinput.nix
@@ -0,0 +1,295 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let cfg = config.services.libinput;
+
+    xorgBool = v: if v then "on" else "off";
+
+    mkConfigForDevice = deviceType: {
+      dev = mkOption {
+        type = types.nullOr types.str;
+        default = null;
+        example = "/dev/input/event0";
+        description = ''
+            Path for ${deviceType} device.  Set to `null` to apply to any
+            auto-detected ${deviceType}.
+          '';
+      };
+
+      accelProfile = mkOption {
+        type = types.enum [ "flat" "adaptive" ];
+        default = "adaptive";
+        example = "flat";
+        description = ''
+            Sets the pointer acceleration profile to the given profile.
+            Permitted values are `adaptive`, `flat`.
+            Not all devices support this option or all profiles.
+            If a profile is unsupported, the default profile for this is used.
+            `flat`: Pointer motion is accelerated by a constant
+            (device-specific) factor, depending on the current speed.
+            `adaptive`: Pointer acceleration depends on the input speed.
+            This is the default profile for most devices.
+          '';
+      };
+
+      accelSpeed = mkOption {
+        type = types.nullOr types.str;
+        default = null;
+        example = "-0.5";
+        description = "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed).";
+      };
+
+      buttonMapping = mkOption {
+        type = types.nullOr types.str;
+        default = null;
+        example = "1 6 3 4 5 0 7";
+        description = ''
+            Sets the logical button mapping for this device, see XSetPointerMapping(3). The string  must
+            be  a  space-separated  list  of  button mappings in the order of the logical buttons on the
+            device, starting with button 1.  The default mapping is "1 2 3 ... 32". A mapping of 0 deac‐
+            tivates the button. Multiple buttons can have the same mapping.  Invalid mapping strings are
+            discarded and the default mapping is used for all buttons.  Buttons  not  specified  in  the
+            user's mapping use the default mapping. See section BUTTON MAPPING for more details.
+          '';
+      };
+
+      calibrationMatrix = mkOption {
+        type = types.nullOr types.str;
+        default = null;
+        example = "0.5 0 0 0 0.8 0.1 0 0 1";
+        description = ''
+            A string of 9 space-separated floating point numbers. Sets the calibration matrix to the
+            3x3 matrix where the first row is (abc), the second row is (def) and the third row is (ghi).
+          '';
+      };
+
+      clickMethod = mkOption {
+        type = types.nullOr (types.enum [ "none" "buttonareas" "clickfinger" ]);
+        default = null;
+        example = "buttonareas";
+        description = ''
+            Enables a click method. Permitted values are `none`,
+            `buttonareas`, `clickfinger`.
+            Not all devices support all methods, if an option is unsupported,
+            the default click method for this device is used.
+          '';
+      };
+
+      leftHanded = mkOption {
+        type = types.bool;
+        default = false;
+        description = "Enables left-handed button orientation, i.e. swapping left and right buttons.";
+      };
+
+      middleEmulation = mkOption {
+        type = types.bool;
+        default = true;
+        description = ''
+            Enables middle button emulation. When enabled, pressing the left and right buttons
+            simultaneously produces a middle mouse button click.
+          '';
+      };
+
+      naturalScrolling = mkOption {
+        type = types.bool;
+        default = false;
+        description = "Enables or disables natural scrolling behavior.";
+      };
+
+      scrollButton = mkOption {
+        type = types.nullOr types.int;
+        default = null;
+        example = 1;
+        description = ''
+            Designates a button as scroll button. If the ScrollMethod is button and the button is logically
+            held down, x/y axis movement is converted into scroll events.
+          '';
+      };
+
+      scrollMethod = mkOption {
+        type = types.enum [ "twofinger" "edge" "button" "none" ];
+        default = "twofinger";
+        example = "edge";
+        description = ''
+            Specify the scrolling method: `twofinger`, `edge`,
+            `button`, or `none`
+          '';
+      };
+
+      horizontalScrolling = mkOption {
+        type = types.bool;
+        default = true;
+        description = ''
+            Enables or disables horizontal scrolling. When disabled, this driver will discard any
+            horizontal scroll events from libinput. This does not disable horizontal scroll events
+            from libinput; it merely discards the horizontal axis from any scroll events.
+          '';
+      };
+
+      sendEventsMode = mkOption {
+        type = types.enum [ "disabled" "enabled" "disabled-on-external-mouse" ];
+        default = "enabled";
+        example = "disabled";
+        description = ''
+            Sets the send events mode to `disabled`, `enabled`,
+            or `disabled-on-external-mouse`
+          '';
+      };
+
+      tapping = mkOption {
+        type = types.bool;
+        default = true;
+        description = ''
+            Enables or disables tap-to-click behavior.
+          '';
+      };
+
+      tappingButtonMap = mkOption {
+        type = types.nullOr (types.enum [ "lrm" "lmr" ]);
+        default = null;
+        description = ''
+          Set the button mapping for 1/2/3-finger taps to left/right/middle or left/middle/right, respectively.
+        '';
+      };
+
+      tappingDragLock = mkOption {
+        type = types.bool;
+        default = true;
+        description = ''
+            Enables or disables drag lock during tapping behavior. When enabled, a finger up during tap-
+            and-drag will not immediately release the button. If the finger is set down again within the
+            timeout, the dragging process continues.
+          '';
+      };
+
+      transformationMatrix = mkOption {
+        type = types.nullOr types.str;
+        default = null;
+        example = "0.5 0 0 0 0.8 0.1 0 0 1";
+        description = ''
+          A string of 9 space-separated floating point numbers. Sets the transformation matrix to
+          the 3x3 matrix where the first row is (abc), the second row is (def) and the third row is (ghi).
+        '';
+      };
+
+      disableWhileTyping = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+            Disable input method while typing.
+          '';
+      };
+
+      additionalOptions = mkOption {
+        type = types.lines;
+        default = "";
+        example =
+        ''
+          Option "DragLockButtons" "L1 B1 L2 B2"
+        '';
+        description = ''
+          Additional options for libinput ${deviceType} driver. See
+          {manpage}`libinput(4)`
+          for available options.";
+        '';
+      };
+    };
+
+    mkX11ConfigForDevice = deviceType: matchIs: ''
+      Identifier "libinput ${deviceType} configuration"
+      MatchDriver "libinput"
+      MatchIs${matchIs} "${xorgBool true}"
+      ${optionalString (cfg.${deviceType}.dev != null) ''MatchDevicePath "${cfg.${deviceType}.dev}"''}
+      Option "AccelProfile" "${cfg.${deviceType}.accelProfile}"
+      ${optionalString (cfg.${deviceType}.accelSpeed != null) ''Option "AccelSpeed" "${cfg.${deviceType}.accelSpeed}"''}
+      ${optionalString (cfg.${deviceType}.buttonMapping != null) ''Option "ButtonMapping" "${cfg.${deviceType}.buttonMapping}"''}
+      ${optionalString (cfg.${deviceType}.calibrationMatrix != null) ''Option "CalibrationMatrix" "${cfg.${deviceType}.calibrationMatrix}"''}
+      ${optionalString (cfg.${deviceType}.transformationMatrix != null) ''Option "TransformationMatrix" "${cfg.${deviceType}.transformationMatrix}"''}
+      ${optionalString (cfg.${deviceType}.clickMethod != null) ''Option "ClickMethod" "${cfg.${deviceType}.clickMethod}"''}
+      Option "LeftHanded" "${xorgBool cfg.${deviceType}.leftHanded}"
+      Option "MiddleEmulation" "${xorgBool cfg.${deviceType}.middleEmulation}"
+      Option "NaturalScrolling" "${xorgBool cfg.${deviceType}.naturalScrolling}"
+      ${optionalString (cfg.${deviceType}.scrollButton != null) ''Option "ScrollButton" "${toString cfg.${deviceType}.scrollButton}"''}
+      Option "ScrollMethod" "${cfg.${deviceType}.scrollMethod}"
+      Option "HorizontalScrolling" "${xorgBool cfg.${deviceType}.horizontalScrolling}"
+      Option "SendEventsMode" "${cfg.${deviceType}.sendEventsMode}"
+      Option "Tapping" "${xorgBool cfg.${deviceType}.tapping}"
+      ${optionalString (cfg.${deviceType}.tappingButtonMap != null) ''Option "TappingButtonMap" "${cfg.${deviceType}.tappingButtonMap}"''}
+      Option "TappingDragLock" "${xorgBool cfg.${deviceType}.tappingDragLock}"
+      Option "DisableWhileTyping" "${xorgBool cfg.${deviceType}.disableWhileTyping}"
+      ${cfg.${deviceType}.additionalOptions}
+    '';
+in {
+
+  imports =
+    (map (option: mkRenamedOptionModule ([ "services" "xserver" "libinput" option ]) [ "services" "libinput" "touchpad" option ]) [
+      "accelProfile"
+      "accelSpeed"
+      "buttonMapping"
+      "calibrationMatrix"
+      "clickMethod"
+      "leftHanded"
+      "middleEmulation"
+      "naturalScrolling"
+      "scrollButton"
+      "scrollMethod"
+      "horizontalScrolling"
+      "sendEventsMode"
+      "tapping"
+      "tappingButtonMap"
+      "tappingDragLock"
+      "transformationMatrix"
+      "disableWhileTyping"
+      "additionalOptions"
+    ]) ++ [
+      (mkRenamedOptionModule [ "services" "xserver" "libinput" "enable" ]   [ "services" "libinput" "enable" ])
+      (mkRenamedOptionModule [ "services" "xserver" "libinput" "mouse" ]    [ "services" "libinput" "mouse" ])
+      (mkRenamedOptionModule [ "services" "xserver" "libinput" "touchpad" ] [ "services" "libinput" "touchpad" ])
+    ];
+
+  options = {
+
+    services.libinput = {
+      enable = mkEnableOption "libinput" // {
+        default = config.services.xserver.enable;
+        defaultText = lib.literalExpression "config.services.xserver.enable";
+      };
+      mouse = mkConfigForDevice "mouse";
+      touchpad = mkConfigForDevice "touchpad";
+    };
+  };
+
+
+  config = mkIf cfg.enable {
+
+    services.xserver.modules = [ pkgs.xorg.xf86inputlibinput ];
+
+    environment.systemPackages = [ pkgs.xorg.xf86inputlibinput ];
+
+    environment.etc =
+      let cfgPath = "X11/xorg.conf.d/40-libinput.conf";
+      in {
+        ${cfgPath} = {
+          source = pkgs.xorg.xf86inputlibinput.out + "/share/" + cfgPath;
+        };
+      };
+
+    services.udev.packages = [ pkgs.libinput.out ];
+
+    services.xserver.inputClassSections = [
+      (mkX11ConfigForDevice "mouse" "Pointer")
+      (mkX11ConfigForDevice "touchpad" "Touchpad")
+    ];
+
+    assertions = [
+      # already present in synaptics.nix
+      /* {
+        assertion = !config.services.xserver.synaptics.enable;
+        message = "Synaptics and libinput are incompatible, you cannot enable both (in services.xserver).";
+      } */
+    ];
+
+  };
+
+}
diff --git a/nixpkgs/nixos/modules/services/hardware/lirc.nix b/nixpkgs/nixos/modules/services/hardware/lirc.nix
index 5b1a8d10c729..8103dbeb2d48 100644
--- a/nixpkgs/nixos/modules/services/hardware/lirc.nix
+++ b/nixpkgs/nixos/modules/services/hardware/lirc.nix
@@ -11,7 +11,7 @@ in {
   options = {
     services.lirc = {
 
-      enable = mkEnableOption (lib.mdDoc "LIRC daemon");
+      enable = mkEnableOption "the LIRC daemon, to receive and send infrared signals";
 
       options = mkOption {
         type = types.lines;
@@ -19,18 +19,18 @@ in {
           [lircd]
           nodaemon = False
         '';
-        description = lib.mdDoc "LIRC default options described in man:lircd(8) ({file}`lirc_options.conf`)";
+        description = "LIRC default options described in man:lircd(8) ({file}`lirc_options.conf`)";
       };
 
       configs = mkOption {
         type = types.listOf types.lines;
-        description = lib.mdDoc "Configurations for lircd to load, see man:lircd.conf(5) for details ({file}`lircd.conf`)";
+        description = "Configurations for lircd to load, see man:lircd.conf(5) for details ({file}`lircd.conf`)";
       };
 
       extraArguments = mkOption {
         type = types.listOf types.str;
         default = [];
-        description = lib.mdDoc "Extra arguments to lircd.";
+        description = "Extra arguments to lircd.";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/cdi-generate.nix b/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/cdi-generate.nix
deleted file mode 100644
index 1aaa2d07b9bd..000000000000
--- a/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/cdi-generate.nix
+++ /dev/null
@@ -1,60 +0,0 @@
-{
-  addDriverRunpath,
-  glibc,
-  jq,
-  lib,
-  nvidia-container-toolkit,
-  nvidia-driver,
-  runtimeShell,
-  writeScriptBin,
-}:
-let
-  mountOptions = { options = ["ro" "nosuid" "nodev" "bind"]; };
-  mounts = [
-    # FIXME: Making /usr mounts optional
-    { hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-control";
-      containerPath = "/usr/bin/nvidia-cuda-mps-control"; }
-    { hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-server";
-      containerPath = "/usr/bin/nvidia-cuda-mps-server"; }
-    { hostPath = lib.getExe' nvidia-driver "nvidia-debugdump";
-      containerPath = "/usr/bin/nvidia-debugdump"; }
-    { hostPath = lib.getExe' nvidia-driver "nvidia-powerd";
-      containerPath = "/usr/bin/nvidia-powerd"; }
-    { hostPath = lib.getExe' nvidia-driver "nvidia-smi";
-      containerPath = "/usr/bin/nvidia-smi"; }
-    { hostPath = lib.getExe' nvidia-container-toolkit "nvidia-ctk";
-      containerPath = "/usr/bin/nvidia-ctk"; }
-    { hostPath = "${lib.getLib glibc}/lib";
-      containerPath = "${lib.getLib glibc}/lib"; }
-
-    # FIXME: use closureinfo
-    {
-      hostPath = addDriverRunpath.driverLink;
-      containerPath = addDriverRunpath.driverLink;
-    }
-    { hostPath = "${lib.getLib glibc}/lib";
-      containerPath = "${lib.getLib glibc}/lib"; }
-    { hostPath = "${lib.getLib glibc}/lib64";
-      containerPath = "${lib.getLib glibc}/lib64"; }
-  ];
-  jqAddMountExpression = ".containerEdits.mounts[.containerEdits.mounts | length] |= . +";
-  mountsToJq = lib.concatMap
-    (mount:
-      ["${lib.getExe jq} '${jqAddMountExpression} ${builtins.toJSON (mount // mountOptions)}'"])
-    mounts;
-in
-writeScriptBin "nvidia-cdi-generator"
-''
-#! ${runtimeShell}
-
-function cdiGenerate {
-  ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"} cdi generate \
-    --format json \
-    --ldconfig-path ${lib.getExe' glibc "ldconfig"} \
-    --library-search-path ${lib.getLib nvidia-driver}/lib \
-    --nvidia-ctk-path ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"}
-}
-
-cdiGenerate | \
-  ${lib.concatStringsSep " | " mountsToJq} > $RUNTIME_DIRECTORY/nvidia-container-toolkit.json
-''
diff --git a/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/default.nix b/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/default.nix
deleted file mode 100644
index b95bdf191fad..000000000000
--- a/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit-cdi-generator/default.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-
-  options = {
-
-    hardware.nvidia-container-toolkit-cdi-generator.enable = lib.mkOption {
-      default = false;
-      internal = true;
-      visible = false;
-      type = lib.types.bool;
-      description = lib.mdDoc ''
-        Enable dynamic CDI configuration for NVidia devices by running
-        nvidia-container-toolkit on boot.
-      '';
-    };
-
-  };
-
-  config = {
-
-    systemd.services.nvidia-container-toolkit-cdi-generator = lib.mkIf config.hardware.nvidia-container-toolkit-cdi-generator.enable {
-      description = "Container Device Interface (CDI) for Nvidia generator";
-      wantedBy = [ "multi-user.target" ];
-      after = [ "systemd-udev-settle.service" ];
-      serviceConfig = {
-        RuntimeDirectory = "cdi";
-        RemainAfterExit = true;
-        ExecStart =
-          let
-            script = pkgs.callPackage ./cdi-generate.nix { nvidia-driver = config.hardware.nvidia.package; };
-          in
-          lib.getExe script;
-        Type = "oneshot";
-      };
-    };
-
-  };
-
-}
diff --git a/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix b/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix
new file mode 100644
index 000000000000..ca769cc44e5c
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit/cdi-generate.nix
@@ -0,0 +1,35 @@
+{
+  glibc,
+  jq,
+  lib,
+  mounts,
+  nvidia-container-toolkit,
+  nvidia-driver,
+  runtimeShell,
+  writeScriptBin,
+}: let
+  mkMount = {hostPath, containerPath, mountOptions}: {
+    inherit hostPath containerPath;
+    options = mountOptions;
+  };
+  jqAddMountExpression = ".containerEdits.mounts[.containerEdits.mounts | length] |= . +";
+  allJqMounts = lib.concatMap
+    (mount:
+      ["${lib.getExe jq} '${jqAddMountExpression} ${builtins.toJSON (mkMount mount)}'"])
+    mounts;
+in
+writeScriptBin "nvidia-cdi-generator"
+''
+#! ${runtimeShell}
+
+function cdiGenerate {
+  ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"} cdi generate \
+    --format json \
+    --ldconfig-path ${lib.getExe' glibc "ldconfig"} \
+    --library-search-path ${lib.getLib nvidia-driver}/lib \
+    --nvidia-ctk-path ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"}
+}
+
+cdiGenerate | \
+  ${lib.concatStringsSep " | " allJqMounts} > $RUNTIME_DIRECTORY/nvidia-container-toolkit.json
+''
diff --git a/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix b/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix
new file mode 100644
index 000000000000..6c6bc667e649
--- /dev/null
+++ b/nixpkgs/nixos/modules/services/hardware/nvidia-container-toolkit/default.nix
@@ -0,0 +1,127 @@
+{ config, lib, pkgs, ... }:
+
+{
+  imports = [
+    (lib.mkRenamedOptionModule
+      [ "virtualisation" "containers" "cdi" "dynamic" "nvidia" "enable" ]
+      [ "hardware" "nvidia-container-toolkit" "enable" ])
+  ];
+
+  options = let
+    mountType = {
+      options = {
+        hostPath = lib.mkOption {
+          type = lib.types.str;
+          description = "Host path.";
+        };
+        containerPath = lib.mkOption {
+          type = lib.types.str;
+          description = "Container path.";
+        };
+        mountOptions = lib.mkOption {
+          default = [ "ro" "nosuid" "nodev" "bind" ];
+          type = lib.types.listOf lib.types.str;
+          description = "Mount options.";
+        };
+      };
+    };
+  in {
+
+    hardware.nvidia-container-toolkit = {
+      enable = lib.mkOption {
+        default = false;
+        type = lib.types.bool;
+        description = ''
+          Enable dynamic CDI configuration for NVidia devices by running
+          nvidia-container-toolkit on boot.
+        '';
+      };
+
+      mounts = lib.mkOption {
+        type = lib.types.listOf (lib.types.submodule mountType);
+        default = [];
+        description = "Mounts to be added to every container under the Nvidia CDI profile.";
+      };
+
+      mount-nvidia-executables = lib.mkOption {
+        default = true;
+        type = lib.types.bool;
+        description = ''
+          Mount executables nvidia-smi, nvidia-cuda-mps-control, nvidia-cuda-mps-server,
+          nvidia-debugdump, nvidia-powerd and nvidia-ctk on containers.
+        '';
+      };
+
+      mount-nvidia-docker-1-directories = lib.mkOption {
+        default = true;
+        type = lib.types.bool;
+        description = ''
+          Mount nvidia-docker-1 directories on containers: /usr/local/nvidia/lib and
+          /usr/local/nvidia/lib64.
+        '';
+      };
+    };
+
+  };
+
+  config = {
+
+    virtualisation.docker.daemon.settings = lib.mkIf
+      (config.hardware.nvidia-container-toolkit.enable &&
+       (lib.versionAtLeast config.virtualisation.docker.package.version "25")) {
+      features.cdi = true;
+    };
+
+    hardware.nvidia-container-toolkit.mounts = let
+      nvidia-driver = config.hardware.nvidia.package;
+    in (lib.mkMerge [
+      [{ hostPath = pkgs.addDriverRunpath.driverLink;
+         containerPath = pkgs.addDriverRunpath.driverLink; }
+       { hostPath = "${lib.getLib pkgs.glibc}/lib";
+         containerPath = "${lib.getLib pkgs.glibc}/lib"; }
+       { hostPath = "${lib.getLib pkgs.glibc}/lib64";
+         containerPath = "${lib.getLib pkgs.glibc}/lib64"; }]
+      (lib.mkIf config.hardware.nvidia-container-toolkit.mount-nvidia-executables
+        [{ hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-control";
+           containerPath = "/usr/bin/nvidia-cuda-mps-control"; }
+         { hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-server";
+           containerPath = "/usr/bin/nvidia-cuda-mps-server"; }
+         { hostPath = lib.getExe' nvidia-driver "nvidia-debugdump";
+           containerPath = "/usr/bin/nvidia-debugdump"; }
+         { hostPath = lib.getExe' nvidia-driver "nvidia-powerd";
+           containerPath = "/usr/bin/nvidia-powerd"; }
+         { hostPath = lib.getExe' nvidia-driver "nvidia-smi";
+           containerPath = "/usr/bin/nvidia-smi"; }])
+      # nvidia-docker 1.0 uses /usr/local/nvidia/lib{,64}
+      #   e.g.
+      #     - https://gitlab.com/nvidia/container-images/cuda/-/blob/e3ff10eab3a1424fe394899df0e0f8ca5a410f0f/dist/12.3.1/ubi9/base/Dockerfile#L44
+      #     - https://github.com/NVIDIA/nvidia-docker/blob/01d2c9436620d7dde4672e414698afe6da4a282f/src/nvidia/volumes.go#L104-L173
+      (lib.mkIf config.hardware.nvidia-container-toolkit.mount-nvidia-docker-1-directories
+        [{ hostPath = "${lib.getLib nvidia-driver}/lib";
+           containerPath = "/usr/local/nvidia/lib"; }
+         { hostPath = "${lib.getLib nvidia-driver}/lib";
+           containerPath = "/usr/local/nvidia/lib64"; }])
+    ]);
+
+    systemd.services.nvidia-container-toolkit-cdi-generator = lib.mkIf config.hardware.nvidia-container-toolkit.enable {
+      description = "Container Device Interface (CDI) for Nvidia generator";
+      wantedBy = [ "multi-user.target" ];
+      after = [ "systemd-udev-settle.service" ];
+      serviceConfig = {
+        RuntimeDirectory = "cdi";
+        RemainAfterExit = true;
+        ExecStart =
+          let
+            script = pkgs.callPackage ./cdi-generate.nix {
+              inherit (config.hardware.nvidia-container-toolkit) mounts;
+              nvidia-driver = config.hardware.nvidia.package;
+            };
+          in
+          lib.getExe script;
+        Type = "oneshot";
+      };
+    };
+
+  };
+
+}
diff --git a/nixpkgs/nixos/modules/services/hardware/nvidia-optimus.nix b/nixpkgs/nixos/modules/services/hardware/nvidia-optimus.nix
index 5b5273ed7823..d53175052c74 100644
--- a/nixpkgs/nixos/modules/services/hardware/nvidia-optimus.nix
+++ b/nixpkgs/nixos/modules/services/hardware/nvidia-optimus.nix
@@ -11,7 +11,7 @@ let kernel = config.boot.kernelPackages; in
     hardware.nvidiaOptimus.disable = lib.mkOption {
       default = false;
       type = lib.types.bool;
-      description = lib.mdDoc ''
+      description = ''
         Completely disable the NVIDIA graphics card and use the
         integrated graphics processor instead.
       '';
diff --git a/nixpkgs/nixos/modules/services/hardware/openrgb.nix b/nixpkgs/nixos/modules/services/hardware/openrgb.nix
index 81b199e50778..6ae5b4e587c6 100644
--- a/nixpkgs/nixos/modules/services/hardware/openrgb.nix
+++ b/nixpkgs/nixos/modules/services/hardware/openrgb.nix
@@ -6,7 +6,7 @@ let
   cfg = config.services.hardware.openrgb;
 in {
   options.services.hardware.openrgb = {
-    enable = mkEnableOption (lib.mdDoc "OpenRGB server");
+    enable = mkEnableOption "OpenRGB server, for RGB lighting control";
 
     package = mkPackageOption pkgs "openrgb" { };
 
@@ -20,13 +20,13 @@ in {
         else if config.hardware.cpu.amd.updateMicrocode then "amd"
         else null;
       '';
-      description = lib.mdDoc "CPU family of motherboard. Allows for addition motherboard i2c support.";
+      description = "CPU family of motherboard. Allows for addition motherboard i2c support.";
     };
 
     server.port = mkOption {
       type = types.port;
       default = 6742;
-      description = lib.mdDoc "Set server port of openrgb.";
+      description = "Set server port of openrgb.";
     };
 
   };
diff --git a/nixpkgs/nixos/modules/services/hardware/pcscd.nix b/nixpkgs/nixos/modules/services/hardware/pcscd.nix
index 77c2d9b53f03..17bab2c5bf20 100644
--- a/nixpkgs/nixos/modules/services/hardware/pcscd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/pcscd.nix
@@ -18,13 +18,13 @@ let
 in
 {
   options.services.pcscd = {
-    enable = mkEnableOption (lib.mdDoc "PCSC-Lite daemon");
+    enable = mkEnableOption "PCSC-Lite daemon, to access smart cards using SCard API (PC/SC)";
 
     plugins = mkOption {
       type = types.listOf types.package;
       defaultText = literalExpression "[ pkgs.ccid ]";
       example = literalExpression "[ pkgs.pcsc-cyberjack ]";
-      description = lib.mdDoc "Plugin packages to be used for PCSC-Lite.";
+      description = "Plugin packages to be used for PCSC-Lite.";
     };
 
     readerConfig = mkOption {
@@ -36,7 +36,7 @@ in
         LIBPATH           /path/to/serial_reader.so
         CHANNELID         1
       '';
-      description = lib.mdDoc ''
+      description = ''
         Configuration for devices that aren't hotpluggable.
 
         See {manpage}`reader.conf(5)` for valid options.
@@ -46,7 +46,7 @@ in
     extraArgs = mkOption {
       type = types.listOf types.str;
       default = [ ];
-      description = lib.mdDoc "Extra command line arguments to be passed to the PCSC daemon.";
+      description = "Extra command line arguments to be passed to the PCSC daemon.";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/hardware/pommed.nix b/nixpkgs/nixos/modules/services/hardware/pommed.nix
index a71004c1767c..9cdb2d4d1af8 100644
--- a/nixpkgs/nixos/modules/services/hardware/pommed.nix
+++ b/nixpkgs/nixos/modules/services/hardware/pommed.nix
@@ -13,7 +13,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to use the pommed tool to handle Apple laptop
           keyboard hotkeys.
         '';
@@ -22,7 +22,7 @@ in {
       configFile = mkOption {
         type = types.nullOr types.path;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The path to the {file}`pommed.conf` file. Leave
           to null to use the default config file
           ({file}`/etc/pommed.conf.mactel`). See the
diff --git a/nixpkgs/nixos/modules/services/hardware/power-profiles-daemon.nix b/nixpkgs/nixos/modules/services/hardware/power-profiles-daemon.nix
index 1d84bf8ac937..05e5b7a00b42 100644
--- a/nixpkgs/nixos/modules/services/hardware/power-profiles-daemon.nix
+++ b/nixpkgs/nixos/modules/services/hardware/power-profiles-daemon.nix
@@ -15,7 +15,7 @@ in
       enable = lib.mkOption {
         type = lib.types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable power-profiles-daemon, a DBus daemon that allows
           changing system behavior based upon user-selected power profiles.
         '';
diff --git a/nixpkgs/nixos/modules/services/hardware/rasdaemon.nix b/nixpkgs/nixos/modules/services/hardware/rasdaemon.nix
index a1334684b7d5..3fe75984b3fb 100644
--- a/nixpkgs/nixos/modules/services/hardware/rasdaemon.nix
+++ b/nixpkgs/nixos/modules/services/hardware/rasdaemon.nix
@@ -10,18 +10,18 @@ in
 {
   options.hardware.rasdaemon = {
 
-    enable = mkEnableOption (lib.mdDoc "RAS logging daemon");
+    enable = mkEnableOption "RAS logging daemon";
 
     record = mkOption {
       type = types.bool;
       default = true;
-      description = lib.mdDoc "record events via sqlite3, required for ras-mc-ctl";
+      description = "record events via sqlite3, required for ras-mc-ctl";
     };
 
     mainboard = mkOption {
       type = types.lines;
       default = "";
-      description = lib.mdDoc "Custom mainboard description, see {manpage}`ras-mc-ctl(8)` for more details.";
+      description = "Custom mainboard description, see {manpage}`ras-mc-ctl(8)` for more details.";
       example = ''
         vendor = ASRock
         model = B450M Pro4
@@ -40,7 +40,7 @@ in
     labels = mkOption {
       type = types.lines;
       default = "";
-      description = lib.mdDoc "Additional memory module label descriptions to be placed in /etc/ras/dimm_labels.d/labels";
+      description = "Additional memory module label descriptions to be placed in /etc/ras/dimm_labels.d/labels";
       example = ''
         # vendor and model may be shown by 'ras-mc-ctl --mainboard'
         vendor: ASRock
@@ -57,7 +57,7 @@ in
     config = mkOption {
       type = types.lines;
       default = "";
-      description = lib.mdDoc ''
+      description = ''
         rasdaemon configuration, currently only used for CE PFA
         for details, read rasdaemon.outPath/etc/sysconfig/rasdaemon's comments
       '';
@@ -72,11 +72,11 @@ in
     extraModules = mkOption {
       type = types.listOf types.str;
       default = [];
-      description = lib.mdDoc "extra kernel modules to load";
+      description = "extra kernel modules to load";
       example = [ "i7core_edac" ];
     };
 
-    testing = mkEnableOption (lib.mdDoc "error injection infrastructure");
+    testing = mkEnableOption "error injection infrastructure";
   };
 
   config = mkIf cfg.enable {
diff --git a/nixpkgs/nixos/modules/services/hardware/ratbagd.nix b/nixpkgs/nixos/modules/services/hardware/ratbagd.nix
index 5567bcbafd16..4398e8d582ea 100644
--- a/nixpkgs/nixos/modules/services/hardware/ratbagd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/ratbagd.nix
@@ -10,7 +10,7 @@ in
 
   options = {
     services.ratbagd = {
-      enable = mkEnableOption (lib.mdDoc "ratbagd for configuring gaming mice");
+      enable = mkEnableOption "ratbagd for configuring gaming mice";
 
       package = mkPackageOption pkgs "libratbag" { };
     };
diff --git a/nixpkgs/nixos/modules/services/hardware/sane.nix b/nixpkgs/nixos/modules/services/hardware/sane.nix
index 8f64afe60734..5f166bb320ba 100644
--- a/nixpkgs/nixos/modules/services/hardware/sane.nix
+++ b/nixpkgs/nixos/modules/services/hardware/sane.nix
@@ -48,7 +48,7 @@ in
     hardware.sane.enable = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Enable support for SANE scanners.
 
         ::: {.note}
@@ -61,19 +61,19 @@ in
       type = types.package;
       default = pkgs.sane-backends;
       defaultText = literalExpression "pkgs.sane-backends";
-      description = lib.mdDoc "Backends driver package to use.";
+      description = "Backends driver package to use.";
     };
 
     hardware.sane.snapshot = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc "Use a development snapshot of SANE scanner drivers.";
+      description = "Use a development snapshot of SANE scanner drivers.";
     };
 
     hardware.sane.extraBackends = mkOption {
       type = types.listOf types.path;
       default = [];
-      description = lib.mdDoc ''
+      description = ''
         Packages providing extra SANE backends to enable.
 
         ::: {.note}
@@ -89,7 +89,7 @@ in
       type = types.listOf types.str;
       default = [];
       example = [ "v4l" ];
-      description = lib.mdDoc ''
+      description = ''
         Names of backends which are enabled by default but should be disabled.
         See `$SANE_CONFIG_DIR/dll.conf` for the list of possible names.
       '';
@@ -98,14 +98,14 @@ in
     hardware.sane.configDir = mkOption {
       type = types.str;
       internal = true;
-      description = lib.mdDoc "The value of SANE_CONFIG_DIR.";
+      description = "The value of SANE_CONFIG_DIR.";
     };
 
     hardware.sane.netConf = mkOption {
       type = types.lines;
       default = "";
       example = "192.168.0.16";
-      description = lib.mdDoc ''
+      description = ''
         Network hosts that should be probed for remote scanners.
       '';
     };
@@ -114,7 +114,7 @@ in
       type = types.bool;
       default = false;
       example = true;
-      description = lib.mdDoc ''
+      description = ''
         Whether to enable drivers for the Fujitsu ScanSnap scanners.
 
         The driver files are unfree and extracted from the Windows driver image.
@@ -133,7 +133,7 @@ in
     hardware.sane.openFirewall = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Open ports needed for discovery of scanners on the local network, e.g.
         needed for Canon scanners (BJNP protocol).
       '';
@@ -142,7 +142,7 @@ in
     services.saned.enable = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Enable saned network daemon for remote connection to scanners.
 
         saned would be run from `scanner` user; to allow
@@ -155,7 +155,7 @@ in
       type = types.lines;
       default = "";
       example = "192.168.0.0/24";
-      description = lib.mdDoc ''
+      description = ''
         Extra saned configuration lines.
       '';
     };
diff --git a/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix b/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix
index e737a4ce20de..8f9998108406 100644
--- a/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix
+++ b/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix
@@ -15,7 +15,7 @@ let
 
       name = mkOption {
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           The friendly name you give to the network device. If undefined,
           the name of attribute will be used.
         '';
@@ -25,7 +25,7 @@ let
 
       model = mkOption {
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           The model of the network device.
         '';
 
@@ -35,7 +35,7 @@ let
       ip = mkOption {
         type = with types; nullOr str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The ip address of the device. If undefined, you will have to
           provide a nodename.
         '';
@@ -46,7 +46,7 @@ let
       nodename = mkOption {
         type = with types; nullOr str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The node name of the device. If undefined, you will have to
           provide an ip.
         '';
@@ -68,8 +68,8 @@ in
   options = {
 
     hardware.sane.brscan4.enable =
-      mkEnableOption (lib.mdDoc "Brother's brscan4 scan backend") // {
-      description = lib.mdDoc ''
+      mkEnableOption "Brother's brscan4 scan backend" // {
+      description = ''
         When enabled, will automatically register the "brscan4" sane
         backend and bring configuration files to their expected location.
       '';
@@ -82,7 +82,7 @@ in
           office2 = { model = "MFC-7860DW"; nodename = "BRW0080927AFBCE"; };
         };
       type = with types; attrsOf (submodule netDeviceOpts);
-      description = lib.mdDoc ''
+      description = ''
         The list of network devices that will be registered against the brscan4
         sane backend.
       '';
diff --git a/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix b/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix
index a4f93221475d..5236970337d8 100644
--- a/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix
+++ b/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan5.nix
@@ -15,7 +15,7 @@ let
 
       name = mkOption {
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           The friendly name you give to the network device. If undefined,
           the name of attribute will be used.
         '';
@@ -25,7 +25,7 @@ let
 
       model = mkOption {
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           The model of the network device.
         '';
 
@@ -35,7 +35,7 @@ let
       ip = mkOption {
         type = with types; nullOr str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The ip address of the device. If undefined, you will have to
           provide a nodename.
         '';
@@ -46,7 +46,7 @@ let
       nodename = mkOption {
         type = with types; nullOr str;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The node name of the device. If undefined, you will have to
           provide an ip.
         '';
@@ -68,7 +68,7 @@ in
   options = {
 
     hardware.sane.brscan5.enable =
-      mkEnableOption (lib.mdDoc "the Brother brscan5 sane backend");
+      mkEnableOption "the Brother brscan5 sane backend";
 
     hardware.sane.brscan5.netDevices = mkOption {
       default = {};
@@ -77,7 +77,7 @@ in
           office2 = { model = "MFC-7860DW"; nodename = "BRW0080927AFBCE"; };
         };
       type = with types; attrsOf (submodule netDeviceOpts);
-      description = lib.mdDoc ''
+      description = ''
         The list of network devices that will be registered against the brscan5
         sane backend.
       '';
diff --git a/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix b/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix
index 5b05694abc01..d71a17f5ea6b 100644
--- a/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix
+++ b/nixpkgs/nixos/modules/services/hardware/sane_extra_backends/dsseries.nix
@@ -6,8 +6,8 @@ with lib;
   options = {
 
     hardware.sane.dsseries.enable =
-      mkEnableOption (lib.mdDoc "Brother DSSeries scan backend") // {
-      description = lib.mdDoc ''
+      mkEnableOption "Brother DSSeries scan backend" // {
+      description = ''
         When enabled, will automatically register the "dsseries" SANE backend.
 
         This supports the Brother DSmobile scanner series, including the
diff --git a/nixpkgs/nixos/modules/services/hardware/spacenavd.nix b/nixpkgs/nixos/modules/services/hardware/spacenavd.nix
index 36f132439377..69ca6f102efe 100644
--- a/nixpkgs/nixos/modules/services/hardware/spacenavd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/spacenavd.nix
@@ -8,7 +8,7 @@ in {
 
   options = {
     hardware.spacenavd = {
-      enable = mkEnableOption (lib.mdDoc "spacenavd to support 3DConnexion devices");
+      enable = mkEnableOption "spacenavd to support 3DConnexion devices";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/hardware/supergfxd.nix b/nixpkgs/nixos/modules/services/hardware/supergfxd.nix
index f7af993d7238..62296014a8dc 100644
--- a/nixpkgs/nixos/modules/services/hardware/supergfxd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/supergfxd.nix
@@ -7,12 +7,12 @@ in
 {
   options = {
     services.supergfxd = {
-      enable = lib.mkEnableOption (lib.mdDoc "the supergfxd service");
+      enable = lib.mkEnableOption "the supergfxd service";
 
       settings = lib.mkOption {
         type = lib.types.nullOr json.type;
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           The content of /etc/supergfxd.conf.
           See https://gitlab.com/asus-linux/supergfxctl/#config-options-etcsupergfxdconf.
         '';
diff --git a/nixpkgs/nixos/modules/services/hardware/tcsd.nix b/nixpkgs/nixos/modules/services/hardware/tcsd.nix
index f22924d410d5..e414b9647c9b 100644
--- a/nixpkgs/nixos/modules/services/hardware/tcsd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/tcsd.nix
@@ -40,7 +40,7 @@ in
       enable = mkOption {
         default = false;
         type = types.bool;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable tcsd, a Trusted Computing management service
           that provides TCG Software Stack (TSS).  The tcsd daemon is
           the only portal to the Trusted Platform Module (TPM), a hardware
@@ -51,19 +51,19 @@ in
       user = mkOption {
         default = "tss";
         type = types.str;
-        description = lib.mdDoc "User account under which tcsd runs.";
+        description = "User account under which tcsd runs.";
       };
 
       group = mkOption {
         default = "tss";
         type = types.str;
-        description = lib.mdDoc "Group account under which tcsd runs.";
+        description = "Group account under which tcsd runs.";
       };
 
       stateDir = mkOption {
         default = "/var/lib/tpm";
         type = types.path;
-        description = lib.mdDoc ''
+        description = ''
           The location of the system persistent storage file.
           The system persistent storage file holds keys and data across
           restarts of the TCSD and system reboots.
@@ -73,20 +73,20 @@ in
       firmwarePCRs = mkOption {
         default = "0,1,2,3,4,5,6,7";
         type = types.str;
-        description = lib.mdDoc "PCR indices used in the TPM for firmware measurements.";
+        description = "PCR indices used in the TPM for firmware measurements.";
       };
 
       kernelPCRs = mkOption {
         default = "8,9,10,11,12";
         type = types.str;
-        description = lib.mdDoc "PCR indices used in the TPM for kernel measurements.";
+        description = "PCR indices used in the TPM for kernel measurements.";
       };
 
       platformCred = mkOption {
         default = "${cfg.stateDir}/platform.cert";
         defaultText = literalExpression ''"''${config.${opt.stateDir}}/platform.cert"'';
         type = types.path;
-        description = lib.mdDoc ''
+        description = ''
           Path to the platform credential for your TPM. Your TPM
           manufacturer may have provided you with a set of credentials
           (certificates) that should be used when creating identities
@@ -100,7 +100,7 @@ in
         default = "${cfg.stateDir}/conformance.cert";
         defaultText = literalExpression ''"''${config.${opt.stateDir}}/conformance.cert"'';
         type = types.path;
-        description = lib.mdDoc ''
+        description = ''
           Path to the conformance credential for your TPM.
           See also the platformCred option'';
       };
@@ -109,7 +109,7 @@ in
         default = "${cfg.stateDir}/endorsement.cert";
         defaultText = literalExpression ''"''${config.${opt.stateDir}}/endorsement.cert"'';
         type = types.path;
-        description = lib.mdDoc ''
+        description = ''
           Path to the endorsement credential for your TPM.
           See also the platformCred option'';
       };
diff --git a/nixpkgs/nixos/modules/services/hardware/thermald.nix b/nixpkgs/nixos/modules/services/hardware/thermald.nix
index a4839f326cc4..4f9202d13d90 100644
--- a/nixpkgs/nixos/modules/services/hardware/thermald.nix
+++ b/nixpkgs/nixos/modules/services/hardware/thermald.nix
@@ -9,12 +9,12 @@ in
   ###### interface
   options = {
     services.thermald = {
-      enable = mkEnableOption (lib.mdDoc "thermald, the temperature management daemon");
+      enable = mkEnableOption "thermald, the temperature management daemon";
 
       debug = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable debug logging.
         '';
       };
@@ -22,13 +22,13 @@ in
      ignoreCpuidCheck = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to ignore the cpuid check to allow running on unsupported platforms";
+        description = "Whether to ignore the cpuid check to allow running on unsupported platforms";
       };
 
       configFile = mkOption {
         type = types.nullOr types.path;
         default = null;
-        description = lib.mdDoc "the thermald manual configuration file.";
+        description = "the thermald manual configuration file.";
       };
 
       package = mkPackageOption pkgs "thermald" { };
diff --git a/nixpkgs/nixos/modules/services/hardware/thinkfan.nix b/nixpkgs/nixos/modules/services/hardware/thinkfan.nix
index b62fb5e9f8c9..37c9fef03d78 100644
--- a/nixpkgs/nixos/modules/services/hardware/thinkfan.nix
+++ b/nixpkgs/nixos/modules/services/hardware/thinkfan.nix
@@ -29,7 +29,7 @@ let
     options = {
       type = mkOption {
         type = types.enum [ "hwmon" "atasmart" "tpacpi" "nvml" ];
-        description = lib.mdDoc ''
+        description = ''
           The ${name} type, can be
           `hwmon` for standard ${name}s,
 
@@ -43,7 +43,7 @@ let
       };
       query = mkOption {
         type = types.str;
-        description = lib.mdDoc ''
+        description = ''
           The query string used to match one or more ${name}s: can be
           a fullpath to the temperature file (single ${name}) or a fullpath
           to a driver directory (multiple ${name}s).
@@ -57,7 +57,7 @@ let
       indices = mkOption {
         type = with types; nullOr (listOf ints.unsigned);
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           A list of ${name}s to pick in case multiple ${name}s match the query.
 
           ::: {.note}
@@ -69,7 +69,7 @@ let
       correction = mkOption {
         type = with types; nullOr (listOf int);
         default = null;
-        description = lib.mdDoc ''
+        description = ''
           A list of values to be added to the temperature of each sensor,
           can be used to equalize small discrepancies in temperature ratings.
         '';
@@ -106,7 +106,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable thinkfan, a fan control program.
 
           ::: {.note}
@@ -120,7 +120,7 @@ in {
       smartSupport = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to build thinkfan with S.M.A.R.T. support to read temperatures
           directly from hard disks.
         '';
@@ -133,7 +133,7 @@ in {
             query = "/proc/acpi/ibm/thermal";
           }
         ];
-        description = lib.mdDoc ''
+        description = ''
           List of temperature sensors thinkfan will monitor.
 
           ${syntaxNote "thermal"}
@@ -147,7 +147,7 @@ in {
             query = "/proc/acpi/ibm/fan";
           }
         ];
-        description = lib.mdDoc ''
+        description = ''
           List of fans thinkfan will control.
 
           ${syntaxNote "fan"}
@@ -165,7 +165,7 @@ in {
           [7  60  85]
           ["level auto" 80 32767]
         ];
-        description = lib.mdDoc ''
+        description = ''
           [LEVEL LOW HIGH]
 
           LEVEL is the fan level to use: it can be an integer (0-7 with thinkpad_acpi),
@@ -181,7 +181,7 @@ in {
         type = types.listOf types.str;
         default = [ ];
         example = [ "-b" "0" ];
-        description = lib.mdDoc ''
+        description = ''
           A list of extra command line arguments to pass to thinkfan.
           Check the thinkfan(1) manpage for available arguments.
         '';
@@ -190,7 +190,7 @@ in {
       settings = mkOption {
         type = types.attrsOf settingsFormat.type;
         default = { };
-        description = lib.mdDoc ''
+        description = ''
           Thinkfan settings. Use this option to configure thinkfan
           settings not exposed in a NixOS option or to bypass one.
           Before changing this, read the `thinkfan.conf(5)`
diff --git a/nixpkgs/nixos/modules/services/hardware/throttled.nix b/nixpkgs/nixos/modules/services/hardware/throttled.nix
index 0f1f00348ee8..143dc83a1d8b 100644
--- a/nixpkgs/nixos/modules/services/hardware/throttled.nix
+++ b/nixpkgs/nixos/modules/services/hardware/throttled.nix
@@ -7,12 +7,12 @@ let
 in {
   options = {
     services.throttled = {
-      enable = mkEnableOption (lib.mdDoc "fix for Intel CPU throttling");
+      enable = mkEnableOption "fix for Intel CPU throttling";
 
       extraConfig = mkOption {
         type = types.str;
         default = "";
-        description = lib.mdDoc "Alternative configuration";
+        description = "Alternative configuration";
       };
     };
   };
diff --git a/nixpkgs/nixos/modules/services/hardware/tlp.nix b/nixpkgs/nixos/modules/services/hardware/tlp.nix
index 0b7f98ab6a6d..148a88e2030f 100644
--- a/nixpkgs/nixos/modules/services/hardware/tlp.nix
+++ b/nixpkgs/nixos/modules/services/hardware/tlp.nix
@@ -20,7 +20,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc "Whether to enable the TLP power management daemon.";
+        description = "Whether to enable the TLP power management daemon.";
       };
 
       settings = mkOption {type = with types; attrsOf (oneOf [bool int float str (listOf str)]);
@@ -29,7 +29,7 @@ in
           SATA_LINKPWR_ON_BAT = "med_power_with_dipm";
           USB_BLACKLIST_PHONE = 1;
         };
-        description = lib.mdDoc ''
+        description = ''
           Options passed to TLP. See https://linrunner.de/tlp for all supported options..
         '';
       };
@@ -37,7 +37,7 @@ in
       extraConfig = mkOption {
         type = types.lines;
         default = "";
-        description = lib.mdDoc ''
+        description = ''
           Verbatim additional configuration variables for TLP.
           DEPRECATED: use services.tlp.settings instead.
         '';
diff --git a/nixpkgs/nixos/modules/services/hardware/trezord.nix b/nixpkgs/nixos/modules/services/hardware/trezord.nix
index b2217fc97124..097acb03631f 100644
--- a/nixpkgs/nixos/modules/services/hardware/trezord.nix
+++ b/nixpkgs/nixos/modules/services/hardware/trezord.nix
@@ -18,7 +18,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Enable Trezor bridge daemon, for use with Trezor hardware bitcoin wallets.
         '';
       };
@@ -26,7 +26,7 @@ in {
       emulator.enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Enable Trezor emulator support.
           '';
        };
@@ -34,7 +34,7 @@ in {
       emulator.port = mkOption {
         type = types.port;
         default = 21324;
-        description = lib.mdDoc ''
+        description = ''
           Listening port for the Trezor emulator.
           '';
       };
diff --git a/nixpkgs/nixos/modules/services/hardware/triggerhappy.nix b/nixpkgs/nixos/modules/services/hardware/triggerhappy.nix
index 54eac70643ff..89f8754c0e68 100644
--- a/nixpkgs/nixos/modules/services/hardware/triggerhappy.nix
+++ b/nixpkgs/nixos/modules/services/hardware/triggerhappy.nix
@@ -22,18 +22,18 @@ let
 
       keys = mkOption {
         type = types.listOf types.str;
-        description = lib.mdDoc "List of keys to match.  Key names as defined in linux/input-event-codes.h";
+        description = "List of keys to match.  Key names as defined in linux/input-event-codes.h";
       };
 
       event = mkOption {
         type = types.enum ["press" "hold" "release"];
         default = "press";
-        description = lib.mdDoc "Event to match.";
+        description = "Event to match.";
       };
 
       cmd = mkOption {
         type = types.str;
-        description = lib.mdDoc "What to run.";
+        description = "What to run.";
       };
 
     };
@@ -52,7 +52,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable the {command}`triggerhappy` hotkey daemon.
         '';
       };
@@ -61,7 +61,7 @@ in
         type = types.str;
         default = "nobody";
         example = "root";
-        description = lib.mdDoc ''
+        description = ''
           User account under which {command}`triggerhappy` runs.
         '';
       };
@@ -72,7 +72,7 @@ in
         example = lib.literalExpression ''
           [ { keys = ["PLAYPAUSE"];  cmd = "''${pkgs.mpc-cli}/bin/mpc -q toggle"; } ]
         '';
-        description = lib.mdDoc ''
+        description = ''
           Key bindings for {command}`triggerhappy`.
         '';
       };
@@ -80,7 +80,7 @@ in
       extraConfig = mkOption {
         type = types.lines;
         default = "";
-        description = lib.mdDoc ''
+        description = ''
           Literal contents to append to the end of {command}`triggerhappy` configuration file.
         '';
       };
diff --git a/nixpkgs/nixos/modules/services/hardware/tuxedo-rs.nix b/nixpkgs/nixos/modules/services/hardware/tuxedo-rs.nix
index 0daccfef3a53..506454c1cadf 100644
--- a/nixpkgs/nixos/modules/services/hardware/tuxedo-rs.nix
+++ b/nixpkgs/nixos/modules/services/hardware/tuxedo-rs.nix
@@ -9,9 +9,9 @@ in
 {
   options = {
     hardware.tuxedo-rs = {
-      enable = mkEnableOption (lib.mdDoc "Rust utilities for interacting with hardware from TUXEDO Computers");
+      enable = mkEnableOption "Rust utilities for interacting with hardware from TUXEDO Computers";
 
-      tailor-gui.enable = mkEnableOption (lib.mdDoc "tailor-gui, an alternative to TUXEDO Control Center, written in Rust");
+      tailor-gui.enable = mkEnableOption "tailor-gui, an alternative to TUXEDO Control Center, written in Rust";
     };
   };
 
diff --git a/nixpkgs/nixos/modules/services/hardware/udev.nix b/nixpkgs/nixos/modules/services/hardware/udev.nix
index 670b9087f110..3db661644281 100644
--- a/nixpkgs/nixos/modules/services/hardware/udev.nix
+++ b/nixpkgs/nixos/modules/services/hardware/udev.nix
@@ -191,7 +191,7 @@ in
     boot.hardwareScan = mkOption {
       type = types.bool;
       default = true;
-      description = lib.mdDoc ''
+      description = ''
         Whether to try to load kernel modules for all detected hardware.
         Usually this does a good job of providing you with the modules
         you need, but sometimes it can crash the system or cause other
@@ -200,14 +200,14 @@ in
     };
 
     services.udev = {
-      enable = mkEnableOption (lib.mdDoc "udev") // {
+      enable = mkEnableOption "udev, a device manager for the Linux kernel" // {
         default = true;
       };
 
       packages = mkOption {
         type = types.listOf types.path;
         default = [];
-        description = lib.mdDoc ''
+        description = ''
           List of packages containing {command}`udev` rules.
           All files found in
           {file}`«pkg»/etc/udev/rules.d` and
@@ -220,7 +220,7 @@ in
       path = mkOption {
         type = types.listOf types.path;
         default = [];
-        description = lib.mdDoc ''
+        description = ''
           Packages added to the {env}`PATH` environment variable when
           executing programs from Udev rules.
 
@@ -235,7 +235,7 @@ in
           ENV{ID_VENDOR_ID}=="046d", ENV{ID_MODEL_ID}=="0825", ENV{PULSE_IGNORE}="1"
         '';
         type = types.lines;
-        description = lib.mdDoc ''
+        description = ''
           Additional {command}`udev` rules. They'll be written
           into file {file}`99-local.rules`. Thus they are
           read and applied after all other rules.
@@ -250,7 +250,7 @@ in
             KEYBOARD_KEY_700e2=leftctrl
         '';
         type = types.lines;
-        description = lib.mdDoc ''
+        description = ''
           Additional {command}`hwdb` files. They'll be written
           into file {file}`99-local.hwdb`. Thus they are
           read after all other files.
@@ -262,7 +262,7 @@ in
     hardware.firmware = mkOption {
       type = types.listOf types.package;
       default = [];
-      description = lib.mdDoc ''
+      description = ''
         List of packages containing firmware files.  Such files
         will be loaded automatically if the kernel asks for them
         (i.e., when it has detected specific hardware that requires
@@ -282,7 +282,7 @@ in
     networking.usePredictableInterfaceNames = mkOption {
       default = true;
       type = types.bool;
-      description = lib.mdDoc ''
+      description = ''
         Whether to assign [predictable names to network interfaces](https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/).
         If enabled, interfaces
         are assigned names that contain topology information
@@ -300,7 +300,7 @@ in
       packages = mkOption {
         type = types.listOf types.path;
         default = [];
-        description = lib.mdDoc ''
+        description = ''
           *This will only be used when systemd is used in stage 1.*
 
           List of packages containing {command}`udev` rules that will be copied to stage 1.
@@ -314,7 +314,7 @@ in
       binPackages = mkOption {
         type = types.listOf types.path;
         default = [];
-        description = lib.mdDoc ''
+        description = ''
           *This will only be used when systemd is used in stage 1.*
 
           Packages to search for binaries that are referenced by the udev rules in stage 1.
@@ -329,7 +329,7 @@ in
           SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1D:60:B9:6D:4F", KERNEL=="eth*", NAME="my_fast_network_card"
         '';
         type = types.lines;
-        description = lib.mdDoc ''
+        description = ''
           {command}`udev` rules to include in the initrd
           *only*. They'll be written into file
           {file}`99-local.rules`. Thus they are read and applied
@@ -401,17 +401,19 @@ in
       }))
     ];
 
-    environment.etc =
-      {
-        "udev/rules.d".source = udevRulesFor {
-          name = "udev-rules";
-          udevPackages = cfg.packages;
-          systemd = config.systemd.package;
-          binPackages = cfg.packages;
-          inherit udevPath udev;
-        };
-        "udev/hwdb.bin".source = hwdbBin;
+    environment.etc = {
+      "udev/rules.d".source = udevRulesFor {
+        name = "udev-rules";
+        udevPackages = cfg.packages;
+        systemd = config.systemd.package;
+        binPackages = cfg.packages;
+        inherit udevPath udev;
       };
+      "udev/hwdb.bin".source = hwdbBin;
+    } // lib.optionalAttrs config.boot.modprobeConfig.enable {
+      # We don't place this into `extraModprobeConfig` so that stage-1 ramdisk doesn't bloat.
+      "modprobe.d/firmware.conf".text = "options firmware_class path=${config.hardware.firmware}/lib/firmware";
+    };
 
     system.requiredKernelConfig = with config.lib.kernelConfig; [
       (isEnabled "UNIX")
@@ -419,21 +421,17 @@ in
       (isYes "NET")
     ];
 
-    # We don't place this into `extraModprobeConfig` so that stage-1 ramdisk doesn't bloat.
-    environment.etc."modprobe.d/firmware.conf".text = "options firmware_class path=${config.hardware.firmware}/lib/firmware";
-
-    system.activationScripts.udevd =
-      ''
-        # The deprecated hotplug uevent helper is not used anymore
-        if [ -e /proc/sys/kernel/hotplug ]; then
-          echo "" > /proc/sys/kernel/hotplug
-        fi
+    system.activationScripts.udevd = lib.mkIf config.boot.kernel.enable ''
+      # The deprecated hotplug uevent helper is not used anymore
+      if [ -e /proc/sys/kernel/hotplug ]; then
+        echo "" > /proc/sys/kernel/hotplug
+      fi
 
-        # Allow the kernel to find our firmware.
-        if [ -e /sys/module/firmware_class/parameters/path ]; then
-          echo -n "${config.hardware.firmware}/lib/firmware" > /sys/module/firmware_class/parameters/path
-        fi
-      '';
+      # Allow the kernel to find our firmware.
+      if [ -e /sys/module/firmware_class/parameters/path ]; then
+        echo -n "${config.hardware.firmware}/lib/firmware" > /sys/module/firmware_class/parameters/path
+      fi
+    '';
 
     systemd.services.systemd-udevd =
       { restartTriggers = cfg.packages;
diff --git a/nixpkgs/nixos/modules/services/hardware/udisks2.nix b/nixpkgs/nixos/modules/services/hardware/udisks2.nix
index 5c058f1f0a6f..46a72b961501 100644
--- a/nixpkgs/nixos/modules/services/hardware/udisks2.nix
+++ b/nixpkgs/nixos/modules/services/hardware/udisks2.nix
@@ -18,12 +18,12 @@ in
 
     services.udisks2 = {
 
-      enable = mkEnableOption (mdDoc "udisks2, a DBus service that allows applications to query and manipulate storage devices");
+      enable = mkEnableOption "udisks2, a DBus service that allows applications to query and manipulate storage devices";
 
       mountOnMedia = mkOption {
         type = types.bool;
         default = false;
-        description = mdDoc ''
+        description = ''
           When enabled, instructs udisks2 to mount removable drives under `/media/` directory, instead of the
           default, ACL-controlled `/run/media/$USER/`. Since `/media/` is not mounted as tmpfs by default, it
           requires cleanup to get rid of stale mountpoints; enabling this option will take care of this at boot.
@@ -53,7 +53,7 @@ in
           };
         };
         '';
-        description = mdDoc ''
+        description = ''
           Options passed to udisksd.
           See [here](http://manpages.ubuntu.com/manpages/latest/en/man5/udisks2.conf.5.html) and
           drive configuration in [here](http://manpages.ubuntu.com/manpages/latest/en/man8/udisks.8.html) for supported options.
diff --git a/nixpkgs/nixos/modules/services/hardware/undervolt.nix b/nixpkgs/nixos/modules/services/hardware/undervolt.nix
index c4d4c6791a21..23bc848b2398 100644
--- a/nixpkgs/nixos/modules/services/hardware/undervolt.nix
+++ b/nixpkgs/nixos/modules/services/hardware/undervolt.nix
@@ -34,16 +34,16 @@ let
 in
 {
   options.services.undervolt = {
-    enable = mkEnableOption (lib.mdDoc ''
+    enable = mkEnableOption ''
        Undervolting service for Intel CPUs.
 
-       Warning: This service is not endorsed by Intel and may permanently damage your hardware. Use at your own risk!
-    '');
+       Warning: This service is not endorsed by Intel and may permanently damage your hardware. Use at your own risk
+    '';
 
     verbose = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Whether to enable verbose logging.
       '';
     };
@@ -53,7 +53,7 @@ in
     coreOffset = mkOption {
       type = types.nullOr types.int;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         The amount of voltage in mV to offset the CPU cores by.
       '';
     };
@@ -61,7 +61,7 @@ in
     gpuOffset = mkOption {
       type = types.nullOr types.int;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         The amount of voltage in mV to offset the GPU by.
       '';
     };
@@ -69,7 +69,7 @@ in
     uncoreOffset = mkOption {
       type = types.nullOr types.int;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         The amount of voltage in mV to offset uncore by.
       '';
     };
@@ -77,7 +77,7 @@ in
     analogioOffset = mkOption {
       type = types.nullOr types.int;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         The amount of voltage in mV to offset analogio by.
       '';
     };
@@ -85,7 +85,7 @@ in
     temp = mkOption {
       type = types.nullOr types.int;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         The temperature target in Celsius degrees.
       '';
     };
@@ -93,7 +93,7 @@ in
     tempAc = mkOption {
       type = types.nullOr types.int;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         The temperature target on AC power in Celsius degrees.
       '';
     };
@@ -101,7 +101,7 @@ in
     tempBat = mkOption {
       type = types.nullOr types.int;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         The temperature target on battery power in Celsius degrees.
       '';
     };
@@ -109,7 +109,7 @@ in
     turbo = mkOption {
       type = types.nullOr types.int;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         Changes the Intel Turbo feature status (1 is disabled and 0 is enabled).
       '';
     };
@@ -117,7 +117,7 @@ in
     p1.limit = mkOption {
       type = with types; nullOr int;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         The P1 Power Limit in Watts.
         Both limit and window must be set.
       '';
@@ -125,7 +125,7 @@ in
     p1.window = mkOption {
       type = with types; nullOr (oneOf [ float int ]);
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         The P1 Time Window in seconds.
         Both limit and window must be set.
       '';
@@ -134,7 +134,7 @@ in
     p2.limit = mkOption {
       type = with types; nullOr int;
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         The P2 Power Limit in Watts.
         Both limit and window must be set.
       '';
@@ -142,7 +142,7 @@ in
     p2.window = mkOption {
       type = with types; nullOr (oneOf [ float int ]);
       default = null;
-      description = lib.mdDoc ''
+      description = ''
         The P2 Time Window in seconds.
         Both limit and window must be set.
       '';
@@ -151,7 +151,7 @@ in
     useTimer = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Whether to set a timer that applies the undervolt settings every 30s.
         This will cause spam in the journal but might be required for some
         hardware under specific conditions.
diff --git a/nixpkgs/nixos/modules/services/hardware/upower.nix b/nixpkgs/nixos/modules/services/hardware/upower.nix
index 0ae31d99aa86..3d0edb0467ea 100644
--- a/nixpkgs/nixos/modules/services/hardware/upower.nix
+++ b/nixpkgs/nixos/modules/services/hardware/upower.nix
@@ -21,7 +21,7 @@ in
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Whether to enable Upower, a DBus service that provides power
           management support to applications.
         '';
@@ -32,7 +32,7 @@ in
       enableWattsUpPro = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Enable the Watts Up Pro device.
 
           The Watts Up Pro contains a generic FTDI USB device without a specific
@@ -50,7 +50,7 @@ in
       noPollBatteries = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Don't poll the kernel for battery level changes.
 
           Some hardware will send us battery level changes through
@@ -62,7 +62,7 @@ in
       ignoreLid = mkOption {
         type = types.bool;
         default = false;
-        description = lib.mdDoc ''
+        description = ''
           Do we ignore the lid state
 
           Some laptops are broken. The lid state is either inverted, or stuck
@@ -76,7 +76,7 @@ in
       usePercentageForPolicy = mkOption {
         type = types.bool;
         default = true;
-        description = lib.mdDoc ''
+        description = ''
           Policy for warnings and action based on battery levels
 
           Whether battery percentage based policy should be used. The default
@@ -90,7 +90,7 @@ in
       percentageLow = mkOption {
         type = types.ints.unsigned;
         default = 10;
-        description = lib.mdDoc ''
+        description = ''
           When `usePercentageForPolicy` is
           `true`, the levels at which UPower will consider the
           battery low.
@@ -108,7 +108,7 @@ in
       percentageCritical = mkOption {
         type = types.ints.unsigned;
         default = 3;
-        description = lib.mdDoc ''
+        description = ''
           When `usePercentageForPolicy` is
           `true`, the levels at which UPower will consider the
           battery critical.
@@ -126,7 +126,7 @@ in
       percentageAction = mkOption {
         type = types.ints.unsigned;
         default = 2;
-        description = lib.mdDoc ''
+        description = ''
           When `usePercentageForPolicy` is
           `true`, the levels at which UPower will take action
           for the critical battery level.
@@ -144,7 +144,7 @@ in
       timeLow = mkOption {
         type = types.ints.unsigned;
         default = 1200;
-        description = lib.mdDoc ''
+        description = ''
           When `usePercentageForPolicy` is
           `false`, the time remaining in seconds at which
           UPower will consider the battery low.
@@ -158,7 +158,7 @@ in
       timeCritical = mkOption {
         type = types.ints.unsigned;
         default = 300;
-        description = lib.mdDoc ''
+        description = ''
           When `usePercentageForPolicy` is
           `false`, the time remaining in seconds at which
           UPower will consider the battery critical.
@@ -172,7 +172,7 @@ in
       timeAction = mkOption {
         type = types.ints.unsigned;
         default = 120;
-        description = lib.mdDoc ''
+        description = ''
           When `usePercentageForPolicy` is
           `false`, the time remaining in seconds at which
           UPower will take action for the critical battery level.
@@ -186,7 +186,7 @@ in
       criticalPowerAction = mkOption {
         type = types.enum [ "PowerOff" "Hibernate" "HybridSleep" ];
         default = "HybridSleep";
-        description = lib.mdDoc ''
+        description = ''
           The action to take when `timeAction` or
           `percentageAction` has been reached for the batteries
           (UPS or laptop batteries) supplying the computer
diff --git a/nixpkgs/nixos/modules/services/hardware/usbmuxd.nix b/nixpkgs/nixos/modules/services/hardware/usbmuxd.nix
index d05ad3af8b12..891619934eb6 100644
--- a/nixpkgs/nixos/modules/services/hardware/usbmuxd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/usbmuxd.nix
@@ -17,7 +17,7 @@ in
     enable = mkOption {
       type = types.bool;
       default = false;
-      description = lib.mdDoc ''
+      description = ''
         Enable the usbmuxd ("USB multiplexing daemon") service. This daemon is
         in charge of multiplexing connections over USB to an iOS device. This is
         needed for transferring data from and to iOS devices (see ifuse). Also
@@ -28,7 +28,7 @@ in
     user = mkOption {
       type = types.str;
       default = defaultUserGroup;
-      description = lib.mdDoc ''
+      description = ''
         The user usbmuxd should use to run after startup.
       '';
     };
@@ -36,7 +36,7 @@ in
     group = mkOption {
       type = types.str;
       default = defaultUserGroup;
-      description = lib.mdDoc ''
+      description = ''
         The group usbmuxd should use to run after startup.
       '';
     };
@@ -45,7 +45,7 @@ in
       type = types.package;
       default = pkgs.usbmuxd;
       defaultText = literalExpression "pkgs.usbmuxd";
-      description = lib.mdDoc "Which package to use for the usbmuxd daemon.";
+      description = "Which package to use for the usbmuxd daemon.";
       relatedPackages = [ "usbmuxd" "usbmuxd2" ];
     };
 
diff --git a/nixpkgs/nixos/modules/services/hardware/usbrelayd.nix b/nixpkgs/nixos/modules/services/hardware/usbrelayd.nix
index 01d3a5ba8bee..31e56ab1d16c 100644
--- a/nixpkgs/nixos/modules/services/hardware/usbrelayd.nix
+++ b/nixpkgs/nixos/modules/services/hardware/usbrelayd.nix
@@ -5,11 +5,11 @@ let
 in
 {
   options.services.usbrelayd = with types; {
-    enable = mkEnableOption (lib.mdDoc "USB Relay MQTT daemon");
+    enable = mkEnableOption "USB Relay MQTT daemon";
 
     broker = mkOption {
       type = str;
-      description = lib.mdDoc "Hostname or IP address of your MQTT Broker.";
+      description = "Hostname or IP address of your MQTT Broker.";
       default = "127.0.0.1";
       example = [
         "mqtt"
@@ -19,7 +19,7 @@ in
 
     clientName = mkOption {
       type = str;
-      description = lib.mdDoc "Name, your client connects as.";
+      description = "Name, your client connects as.";
       default = "MyUSBRelay";
     };
   };
diff --git a/nixpkgs/nixos/modules/services/hardware/vdr.nix b/nixpkgs/nixos/modules/services/hardware/vdr.nix
index 689d83f7eedc..6adab680257f 100644
--- a/nixpkgs/nixos/modules/services/hardware/vdr.nix
+++ b/nixpkgs/nixos/modules/services/hardware/vdr.nix
@@ -3,13 +3,13 @@ let
   cfg = config.services.vdr;
 
   inherit (lib)
-    mkEnableOption mkPackageOption mkOption types mkIf optional mdDoc;
+    mkEnableOption mkPackageOption mkOption types mkIf optional;
 in
 {
   options = {
 
     services.vdr = {
-      enable = mkEnableOption (mdDoc "Start VDR");
+      enable = mkEnableOption "VDR, a video disk recorder";
 
       package = mkPackageOption pkgs "vdr" {
         example = "wrapVdr.override { plugins = with pkgs.vdrPlugins; [ hello ]; }";
@@ -18,21 +18,21 @@ in
       videoDir = mkOption {
         type = types.path;
         default = "/srv/vdr/video";
-        description = mdDoc "Recording directory";
+        description = "Recording directory";
       };
 
       extraArguments = mkOption {
         type = types.listOf types.str;
         default = [ ];
-        description = mdDoc "Additional command line arguments to pass to VDR.";
+        description = "Additional command line arguments to pass to VDR.";
       };
 
-      enableLirc = mkEnableOption (mdDoc "LIRC");
+      enableLirc = mkEnableOption "LIRC";
 
       user = mkOption {
         type = types.str;
         default = "vdr";
-        description = mdDoc ''
+        description = ''
           User under which the VDR service runs.
         '';
       };
@@ -40,7 +40,7 @@ in
       group = mkOption {
         type = types.str;
         default = "vdr";
-        description = mdDoc ''
+        description = ''
           Group under which the VDRvdr service runs.
         '';
       };