about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/hardware
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-02-26 23:32:33 +0000
committerAlyssa Ross <hi@alyssa.is>2019-02-26 23:32:33 +0000
commit1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5 (patch)
treecba73be7e3108dca51f75c9ec44a8bd61246b11a /nixpkgs/nixos/modules/hardware
parentdb8291322dd83add2250dd4480b46298655cbfba (diff)
parent1233c8d9e9bc463899ed6a8cf0232e6bf36475ee (diff)
downloadnixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar
nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar.gz
nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar.bz2
nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar.lz
nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar.xz
nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.tar.zst
nixlib-1bf6dffc1145dcf54c2b60d8a72cd384de0ef0b5.zip
Merge commit '1233c8d9e9bc463899ed6a8cf0232e6bf36475ee'
Diffstat (limited to 'nixpkgs/nixos/modules/hardware')
-rw-r--r--nixpkgs/nixos/modules/hardware/acpilight.nix24
-rw-r--r--nixpkgs/nixos/modules/hardware/ledger.nix14
-rw-r--r--nixpkgs/nixos/modules/hardware/video/uvcvideo/uvcdynctrl-udev-rules.nix1
3 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/hardware/acpilight.nix b/nixpkgs/nixos/modules/hardware/acpilight.nix
new file mode 100644
index 000000000000..34e8a2220965
--- /dev/null
+++ b/nixpkgs/nixos/modules/hardware/acpilight.nix
@@ -0,0 +1,24 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+let
+  cfg = config.hardware.acpilight;
+in
+{
+  options = {
+    hardware.acpilight = {
+      enable = mkOption {
+        default = false;
+        type = types.bool;
+        description = ''
+          Enable acpilight.
+          This will allow brightness control via xbacklight from users in the video group
+        '';
+      };
+    };
+  };
+
+  config = mkIf cfg.enable {
+    services.udev.packages = with pkgs; [ acpilight ];
+  };
+}
diff --git a/nixpkgs/nixos/modules/hardware/ledger.nix b/nixpkgs/nixos/modules/hardware/ledger.nix
new file mode 100644
index 000000000000..41abe74315a0
--- /dev/null
+++ b/nixpkgs/nixos/modules/hardware/ledger.nix
@@ -0,0 +1,14 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.hardware.ledger;
+
+in {
+  options.hardware.ledger.enable = mkEnableOption "udev rules for Ledger devices";
+
+  config = mkIf cfg.enable {
+    services.udev.packages = [ pkgs.ledger-udev-rules ];
+  };
+}
diff --git a/nixpkgs/nixos/modules/hardware/video/uvcvideo/uvcdynctrl-udev-rules.nix b/nixpkgs/nixos/modules/hardware/video/uvcvideo/uvcdynctrl-udev-rules.nix
index 2cf5f13bc159..a808429c9996 100644
--- a/nixpkgs/nixos/modules/hardware/video/uvcvideo/uvcdynctrl-udev-rules.nix
+++ b/nixpkgs/nixos/modules/hardware/video/uvcvideo/uvcdynctrl-udev-rules.nix
@@ -29,6 +29,7 @@ runCommand "uvcdynctrl-udev-rules-${version}"
   ];
   dontPatchELF = true;
   dontStrip = true;
+  preferLocalBuild = true;
 }
 ''
   mkdir -p "$out/lib/udev"