summary refs log tree commit diff
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authornyanloutre <paul@nyanlout.re>2018-09-30 10:59:57 +0200
committernyanloutre <paul@nyanlout.re>2018-09-30 11:22:32 +0200
commitda86afba0d610170993eef053f534afc469269a3 (patch)
treebb6be4994dda0b777a54f14c1817367e3e7d50f7 /nixos/modules/hardware
parent7af3a85d8d1a91b57b6cdee0b2e5d88981f310fa (diff)
downloadnixlib-da86afba0d610170993eef053f534afc469269a3.tar
nixlib-da86afba0d610170993eef053f534afc469269a3.tar.gz
nixlib-da86afba0d610170993eef053f534afc469269a3.tar.bz2
nixlib-da86afba0d610170993eef053f534afc469269a3.tar.lz
nixlib-da86afba0d610170993eef053f534afc469269a3.tar.xz
nixlib-da86afba0d610170993eef053f534afc469269a3.tar.zst
nixlib-da86afba0d610170993eef053f534afc469269a3.zip
nixos/steam-hardware: module init
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/steam-hardware.nix25
1 files changed, 25 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
+    ];
+  };
+}