I found it a bit fiddly to get a Xbox controller I had used for years on Fedora working on NixOS. I recall all sorts of incantations to get it working on Fedora and thankfully it was a bit easier on NixOS, but I had to piece together some reddit posts and other content to get it working.
TL;DR
- Add this to your configuration:
hardware.steam-hardware.enable = true;
hardware.xone.enable = true;
environment.systemPackages = with pkgs; [ linuxKernel.packages.linux_zen.xone ];
- Reboot
- Plug in adapter
- Hold sync on controller
- Hold sync on adapter
That seemed to do the trick to get it working on Steam.
Per the NixOS docs hardware.steam-hardware.enable = true;
is probably not needed but my config is unfortunately not well documented so it’ll stay there for now.
Sources
https://old.reddit.com/r/NixOS/comments/ywzo6t/anyone_know_how_to_the_get_the_xone_driver_to/ https://nixos.wiki/wiki/Steam