summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2022-08-20 23:53:54 +0200
committerpennae <82953136+pennae@users.noreply.github.com>2022-08-27 19:18:29 +0200
commit429ae9ff3d4b91617af7a964cd53dbf3552b1828 (patch)
tree98036641f52ae615343f705b28b116ac69c63a04 /nixos
parent9217509ece789e3c8c0651b58330ac131d9e0cbf (diff)
downloadnixpkgs-429ae9ff3d4b91617af7a964cd53dbf3552b1828.tar
nixpkgs-429ae9ff3d4b91617af7a964cd53dbf3552b1828.tar.gz
nixpkgs-429ae9ff3d4b91617af7a964cd53dbf3552b1828.tar.bz2
nixpkgs-429ae9ff3d4b91617af7a964cd53dbf3552b1828.tar.lz
nixpkgs-429ae9ff3d4b91617af7a964cd53dbf3552b1828.tar.xz
nixpkgs-429ae9ff3d4b91617af7a964cd53dbf3552b1828.tar.zst
nixpkgs-429ae9ff3d4b91617af7a964cd53dbf3552b1828.zip
nixos/thinkfan: convert descriptions to MD
also convert multi-line literals to code blocks to make them render in a
legible manner.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/hardware/thinkfan.nix62
1 files changed, 34 insertions, 28 deletions
diff --git a/nixos/modules/services/hardware/thinkfan.nix b/nixos/modules/services/hardware/thinkfan.nix
index 86dabe71a4f..8fa7b456f20 100644
--- a/nixos/modules/services/hardware/thinkfan.nix
+++ b/nixos/modules/services/hardware/thinkfan.nix
@@ -43,24 +43,26 @@ let
       };
       query = mkOption {
         type = types.str;
-        description = ''
+        description = lib.mdDoc ''
           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).
 
-          <note><para>
-            When multiple ${name}s match, the query can be restricted using the
-            <option>name</option> or <option>indices</option> options.
-          </para></note>
+          ::: {.note}
+          When multiple ${name}s match, the query can be restricted using the
+          {option}`name` or {option}`indices` options.
+          :::
         '';
       };
       indices = mkOption {
         type = with types; nullOr (listOf ints.unsigned);
         default = null;
-        description = ''
+        description = lib.mdDoc ''
           A list of ${name}s to pick in case multiple ${name}s match the query.
 
-          <note><para>Indices start from 0.</para></note>
+          ::: {.note}
+          Indices start from 0.
+          :::
         '';
       };
     } // optionalAttrs (name == "sensor") {
@@ -81,18 +83,18 @@ let
     // { "${type}" = query; };
 
   syntaxNote = name: ''
-    <note><para>
-      This section slightly departs from the thinkfan.conf syntax.
-      The type and path must be specified like this:
-      <literal>
-        type = "tpacpi";
-        query = "/proc/acpi/ibm/${name}";
-      </literal>
-      instead of a single declaration like:
-      <literal>
-        - tpacpi: /proc/acpi/ibm/${name}
-      </literal>
-    </para></note>
+    ::: {.note}
+    This section slightly departs from the thinkfan.conf syntax.
+    The type and path must be specified like this:
+    ```
+      type = "tpacpi";
+      query = "/proc/acpi/ibm/${name}";
+    ```
+    instead of a single declaration like:
+    ```
+      - tpacpi: /proc/acpi/ibm/${name}
+    ```
+    :::
   '';
 
 in {
@@ -104,13 +106,13 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = ''
+        description = lib.mdDoc ''
           Whether to enable thinkfan, a fan control program.
 
-          <note><para>
-            This module targets IBM/Lenovo thinkpads by default, for
-            other hardware you will have configure it more carefully.
-          </para></note>
+          ::: {.note}
+          This module targets IBM/Lenovo thinkpads by default, for
+          other hardware you will have configure it more carefully.
+          :::
         '';
         relatedPackages = [ "thinkfan" ];
       };
@@ -131,9 +133,11 @@ in {
             query = "/proc/acpi/ibm/thermal";
           }
         ];
-        description = ''
+        description = lib.mdDoc ''
           List of temperature sensors thinkfan will monitor.
-        '' + syntaxNote "thermal";
+
+          ${syntaxNote "thermal"}
+        '';
       };
 
       fans = mkOption {
@@ -143,9 +147,11 @@ in {
             query = "/proc/acpi/ibm/fan";
           }
         ];
-        description = ''
+        description = lib.mdDoc ''
           List of fans thinkfan will control.
-        '' + syntaxNote "fan";
+
+          ${syntaxNote "fan"}
+        '';
       };
 
       levels = mkOption {