flake/nixos/modules/hardware/accessories/xbox-one-controller.nix

19 lines
509 B
Nix
Raw Normal View History

{
lib,
config,
...
}: let
2023-12-15 18:40:18 +00:00
cfg = config.myFlake.hardware.accessories.xboxOneController;
in {
options = {
2023-12-15 18:40:18 +00:00
myFlake.hardware.accessories.xboxOneController.enable =
lib.mkEnableOption "Whether to enable support for Xbox One controllers.";
};
# https://wiki.archlinux.org/title/Gamepad#Connect_Xbox_Wireless_Controller_with_Bluetooth
config = lib.mkIf cfg.enable {
hardware.xone.enable = true; # via Bluetooth
hardware.xpadneo.enable = true; # via wired or wireless dongle
};
}