From da86afba0d610170993eef053f534afc469269a3 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Sun, 30 Sep 2018 10:59:57 +0200 Subject: nixos/steam-hardware: module init --- nixos/modules/hardware/steam-hardware.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 nixos/modules/hardware/steam-hardware.nix (limited to 'nixos/modules/hardware/steam-hardware.nix') diff --git a/nixos/modules/hardware/steam-hardware.nix b/nixos/modules/hardware/steam-hardware.nix new file mode 100644 index 00000000000..378aeffe71b --- /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 + ]; + }; +} -- cgit 1.4.1