about summary refs log tree commit diff
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authorh7x4 <h7x4@nani.wtf>2023-11-27 01:19:27 +0100
committerh7x4 <h7x4@nani.wtf>2023-11-27 01:28:36 +0100
commit0a37316d6cfea44280f4470b6867a711a24606bd (patch)
tree0dce949073e1f1647975a2ec3adfb7facdbb8ac4 /nixos/modules/hardware
parent9cc575741df943328b2dbbf6ef7c5dfd49c1bbe0 (diff)
treewide: use `mkPackageOption`
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/ckb-next.nix9
-rw-r--r--nixos/modules/hardware/digitalbitbox.nix9
-rw-r--r--nixos/modules/hardware/opentabletdriver.nix9
3 files changed, 6 insertions, 21 deletions
diff --git a/nixos/modules/hardware/ckb-next.nix b/nixos/modules/hardware/ckb-next.nix
index 79977939eec81..34f951a7446f4 100644
--- a/nixos/modules/hardware/ckb-next.nix
+++ b/nixos/modules/hardware/ckb-next.nix
@@ -24,14 +24,7 @@ in
         '';
       };
 
-      package = mkOption {
-        type = types.package;
-        default = pkgs.ckb-next;
-        defaultText = literalExpression "pkgs.ckb-next";
-        description = lib.mdDoc ''
-          The package implementing the Corsair keyboard/mouse driver.
-        '';
-      };
+      package = mkPackageOption pkgs "ckb-next" { };
     };
 
     config = mkIf cfg.enable {
diff --git a/nixos/modules/hardware/digitalbitbox.nix b/nixos/modules/hardware/digitalbitbox.nix
index 74e46bd34acea..ea04d72a63a55 100644
--- a/nixos/modules/hardware/digitalbitbox.nix
+++ b/nixos/modules/hardware/digitalbitbox.nix
@@ -16,11 +16,10 @@ in
       '';
     };
 
-    package = mkOption {
-      type = types.package;
-      default = pkgs.digitalbitbox;
-      defaultText = literalExpression "pkgs.digitalbitbox";
-      description = lib.mdDoc "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
+    package = mkPackageOption pkgs "digitalbitbox" {
+      extraDescription = ''
+        This can be used to install a package with udev rules that differ from the defaults.
+      '';
     };
   };
 
diff --git a/nixos/modules/hardware/opentabletdriver.nix b/nixos/modules/hardware/opentabletdriver.nix
index e3f418abce4f8..f103da14c9dd1 100644
--- a/nixos/modules/hardware/opentabletdriver.nix
+++ b/nixos/modules/hardware/opentabletdriver.nix
@@ -26,14 +26,7 @@ in
         '';
       };
 
-      package = mkOption {
-        type = types.package;
-        default = pkgs.opentabletdriver;
-        defaultText = literalExpression "pkgs.opentabletdriver";
-        description = lib.mdDoc ''
-          OpenTabletDriver derivation to use.
-        '';
-      };
+      package = mkPackageOption pkgs "opentabletdriver" { };
 
       daemon = {
         enable = mkOption {