about summary refs log tree commit diff
path: root/nixos/modules/services/hardware
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-30 17:37:45 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-30 18:47:43 +0100
commit408b8b5725c3e6fff75aef772da248d3e95ff414 (patch)
tree692e3b61dbbff85cc97e3becf13a1376dea04a92 /nixos/modules/services/hardware
parentd882e1966251880240599d3c1b31e060661506ee (diff)
downloadnixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar.gz
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar.bz2
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar.lz
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar.xz
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.tar.zst
nixlib-408b8b5725c3e6fff75aef772da248d3e95ff414.zip
Add lots of missing option types
Diffstat (limited to 'nixos/modules/services/hardware')
-rw-r--r--nixos/modules/services/hardware/acpid.nix4
-rw-r--r--nixos/modules/services/hardware/bluetooth.nix1
-rw-r--r--nixos/modules/services/hardware/sane.nix29
-rw-r--r--nixos/modules/services/hardware/udev.nix1
-rw-r--r--nixos/modules/services/hardware/udisks.nix1
-rw-r--r--nixos/modules/services/hardware/udisks2.nix1
-rw-r--r--nixos/modules/services/hardware/upower.nix1
7 files changed, 25 insertions, 13 deletions
diff --git a/nixos/modules/services/hardware/acpid.nix b/nixos/modules/services/hardware/acpid.nix
index 6a595f8306bc..adba6394dcf5 100644
--- a/nixos/modules/services/hardware/acpid.nix
+++ b/nixos/modules/services/hardware/acpid.nix
@@ -66,21 +66,25 @@ in
     services.acpid = {
 
       enable = mkOption {
+        type = types.bool;
         default = false;
         description = "Whether to enable the ACPI daemon.";
       };
 
       powerEventCommands = mkOption {
+        type = types.lines;
         default = "";
         description = "Shell commands to execute on a button/power.* event.";
       };
 
       lidEventCommands = mkOption {
+        type = types.lines;
         default = "";
         description = "Shell commands to execute on a button/lid.* event.";
       };
 
       acEventCommands = mkOption {
+        type = types.lines;
         default = "";
         description = "Shell commands to execute on an ac_adapter.* event.";
       };
diff --git a/nixos/modules/services/hardware/bluetooth.nix b/nixos/modules/services/hardware/bluetooth.nix
index 6bc0ad0bf774..b0714a3ce800 100644
--- a/nixos/modules/services/hardware/bluetooth.nix
+++ b/nixos/modules/services/hardware/bluetooth.nix
@@ -9,6 +9,7 @@ with pkgs.lib;
   options = {
 
     hardware.bluetooth.enable = mkOption {
+      type = types.bool;
       default = false;
       description = "Whether to enable support for Bluetooth.";
     };
diff --git a/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix
index 905445f22c1b..5979feb82409 100644
--- a/nixos/modules/services/hardware/sane.nix
+++ b/nixos/modules/services/hardware/sane.nix
@@ -2,6 +2,12 @@
 
 with pkgs.lib;
 
+let
+
+  pkg = if config.hardware.sane.snapshot then pkgs.saneBackendsGit else pkgs.saneBackends;
+
+in
+
 {
 
   ###### interface
@@ -9,11 +15,13 @@ with pkgs.lib;
   options = {
 
     hardware.sane.enable = mkOption {
+      type = types.bool;
       default = false;
       description = "Enable support for SANE scanners.";
     };
 
     hardware.sane.snapshot = mkOption {
+      type = types.bool;
       default = false;
       description = "Use a development snapshot of SANE scanner drivers.";
     };
@@ -23,18 +31,13 @@ with pkgs.lib;
 
   ###### implementation
 
-    config = let pkg = if config.hardware.sane.snapshot
-                          then pkgs.saneBackendsGit
-                          else pkgs.saneBackends;
-      in mkIf config.hardware.sane.enable {
-           environment.systemPackages = [ pkg ];
-           services.udev.packages = [ pkg ];
-           
-           users.extraGroups = singleton {
-             name = "scanner";
-             gid = config.ids.gids.scanner;
-           };
-
-      };
+  config = mkIf config.hardware.sane.enable {
+
+    environment.systemPackages = [ pkg ];
+    services.udev.packages = [ pkg ];
+
+    users.extraGroups."scanner".gid = config.ids.gids.scanner;
+
+  };
 
 }
diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix
index 75f01fbc5a95..516569c02808 100644
--- a/nixos/modules/services/hardware/udev.nix
+++ b/nixos/modules/services/hardware/udev.nix
@@ -114,6 +114,7 @@ in
   options = {
 
     boot.hardwareScan = mkOption {
+      type = types.bool;
       default = true;
       description = ''
         Whether to try to load kernel modules for all detected hardware.
diff --git a/nixos/modules/services/hardware/udisks.nix b/nixos/modules/services/hardware/udisks.nix
index 1ba17c589d23..531ee192573a 100644
--- a/nixos/modules/services/hardware/udisks.nix
+++ b/nixos/modules/services/hardware/udisks.nix
@@ -13,6 +13,7 @@ with pkgs.lib;
     services.udisks = {
 
       enable = mkOption {
+        type = types.bool;
         default = false;
         description = ''
           Whether to enable Udisks, a DBus service that allows
diff --git a/nixos/modules/services/hardware/udisks2.nix b/nixos/modules/services/hardware/udisks2.nix
index eae4172ccb3e..178ec379ff1b 100644
--- a/nixos/modules/services/hardware/udisks2.nix
+++ b/nixos/modules/services/hardware/udisks2.nix
@@ -13,6 +13,7 @@ with pkgs.lib;
     services.udisks2 = {
 
       enable = mkOption {
+        type = types.bool;
         default = false;
         description = ''
           Whether to enable Udisks, a DBus service that allows
diff --git a/nixos/modules/services/hardware/upower.nix b/nixos/modules/services/hardware/upower.nix
index 5d1658adb75f..4a9b13d4aa09 100644
--- a/nixos/modules/services/hardware/upower.nix
+++ b/nixos/modules/services/hardware/upower.nix
@@ -13,6 +13,7 @@ with pkgs.lib;
     services.upower = {
 
       enable = mkOption {
+        type = types.bool;
         default = false;
         description = ''
           Whether to enable Upower, a DBus service that provides power