[xpadneo] Moved to it's own config. Adds an env var for steam.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable bluetooth.
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Install the management service and packages.
|
||||
environment.systemPackages = with pkgs; [
|
||||
bluez
|
||||
];
|
||||
|
||||
26
system/features/xpadneo.nix
Normal file
26
system/features/xpadneo.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
_: {
|
||||
hardware = {
|
||||
# Wireless xbox controllers
|
||||
xpadneo = {
|
||||
enable = true;
|
||||
settings = {
|
||||
disable_mouse = 1;
|
||||
};
|
||||
};
|
||||
|
||||
# Hardwired xbox controllers.
|
||||
xone.enable = true;
|
||||
};
|
||||
|
||||
# disable_ertm is required for xpadneo to connect properly and establish a
|
||||
# data connection. enable_autosuspend is to prevent Linux from putting the
|
||||
# BT radio to sleep and causing a disconnect.
|
||||
boot.extraModprobeConfig = ''
|
||||
options bluetooth disable_ertm=1
|
||||
options btusb enable_autosuspend=0
|
||||
'';
|
||||
|
||||
# Steam also needs HID API to be off so SDL will read directly from evdev,
|
||||
# otherwise it won't get any events from xpadneo.
|
||||
environment.sessionVariables.SDL_JOYSTICK_HIDAPI = "0";
|
||||
}
|
||||
Reference in New Issue
Block a user