summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-10-02 00:55:41 +0100
committerGitHub <noreply@github.com>2018-10-02 00:55:41 +0100
commitbc0d87a4f1a3335d3f8e63626a600327ef3d55f4 (patch)
tree501a6d19e4e3f77248c837268894ab7b491ae8b3 /nixos/modules
parent2ada8f78d041fe958814f2c7b49e50eeacac0eb0 (diff)
parentd859a66351181bf63d2f311269e2b71bf949e166 (diff)
downloadnixlib-bc0d87a4f1a3335d3f8e63626a600327ef3d55f4.tar
nixlib-bc0d87a4f1a3335d3f8e63626a600327ef3d55f4.tar.gz
nixlib-bc0d87a4f1a3335d3f8e63626a600327ef3d55f4.tar.bz2
nixlib-bc0d87a4f1a3335d3f8e63626a600327ef3d55f4.tar.lz
nixlib-bc0d87a4f1a3335d3f8e63626a600327ef3d55f4.tar.xz
nixlib-bc0d87a4f1a3335d3f8e63626a600327ef3d55f4.tar.zst
nixlib-bc0d87a4f1a3335d3f8e63626a600327ef3d55f4.zip
Merge pull request #47455 from nyanloutre/steamPackages.steam-udev
steamPackages.steam: add udev rules and update to 1.0.0.56
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/hardware/steam-hardware.nix25
-rw-r--r--nixos/modules/module-list.nix1
2 files changed, 26 insertions, 0 deletions
diff --git a/nixos/modules/hardware/steam-hardware.nix b/nixos/modules/hardware/steam-hardware.nix
new file mode 100644
index 000000000000..378aeffe71b5
--- /dev/null
+++ b/nixos/modules/hardware/steam-hardware.nix
@@ -0,0 +1,25 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+  cfg = config.hardware.steam-hardware;
+
+in
+
+{
+  options.hardware.steam-hardware = {
+    enable = mkOption {
+      type = types.bool;
+      default = false;
+      description = "Enable udev rules for Steam hardware such as the Steam Controller, other supported controllers and the HTC Vive";
+    };
+  };
+
+  config = mkIf cfg.enable {
+    services.udev.packages = [
+      pkgs.steamPackages.steam
+    ];
+  };
+}
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index f4c7cf601bf1..87224fa6b51a 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -46,6 +46,7 @@
   ./hardware/opengl.nix
   ./hardware/pcmcia.nix
   ./hardware/raid/hpsa.nix
+  ./hardware/steam-hardware.nix
   ./hardware/usb-wwan.nix
   ./hardware/onlykey.nix
   ./hardware/video/amdgpu.nix