nixpkgs/nixos/modules/hardware/steam-hardware.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
756 B
Nix
Raw Permalink Normal View History

2018-09-30 10:59:57 +02:00
{
config,
lib,
pkgs,
...
}:
let
cfg = config.hardware.steam-hardware;
in
{
options.hardware.steam-hardware = {
enable = lib.mkOption {
type = lib.types.bool;
2018-09-30 10:59:57 +02:00
default = false;
description = "Enable udev rules for Steam hardware such as the Steam Controller, other supported controllers and the HTC Vive";
};
};
config = lib.mkIf cfg.enable {
2018-09-30 10:59:57 +02:00
services.udev.packages = [
pkgs.steam-devices-udev-rules
2018-09-30 10:59:57 +02:00
];
# The uinput module needs to be loaded in order to trigger the udev rules
# defined in the steam package for setting permissions on /dev/uinput.
#
# If the udev rules are not triggered, some controllers won't work with
# steam.
boot.kernelModules = [ "uinput" ];
2018-09-30 10:59:57 +02:00
};
}