[xpadneo] Moved to it's own config. Adds an env var for steam.

This commit is contained in:
2026-07-11 20:52:43 -07:00
parent bc39d60a00
commit e9e868a4c5
4 changed files with 30 additions and 18 deletions

View File

@@ -1,6 +1,9 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
# Enable bluetooth.
hardware.bluetooth.enable = true;
# Install the management service and packages.
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
bluez bluez
]; ];

View 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";
}

View File

@@ -11,6 +11,7 @@
../../features/gc.nix ../../features/gc.nix
../../features/gui.nix ../../features/gui.nix
../../features/virtualbox.nix ../../features/virtualbox.nix
../../features/xpadneo.nix
./configuration.nix ./configuration.nix
./hardware-configuration.nix ./hardware-configuration.nix
./qmk.nix ./qmk.nix

View File

@@ -32,14 +32,6 @@
}; };
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ]; extraModulePackages = [ ];
# 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.
extraModprobeConfig = ''
options bluetooth disable_ertm=1
options btusb enable_autosuspend=0
'';
}; };
fileSystems = { fileSystems = {
@@ -115,16 +107,6 @@
# Enable the nvidia-settings menu? # Enable the nvidia-settings menu?
nvidiaSettings = true; nvidiaSettings = true;
}; };
# Wireless xbox controllers
xpadneo = {
enable = true;
settings = {
disable_mouse = 1;
};
};
# Hardwire xbox controllers.
xone.enable = true;
bluetooth.enable = true;
}; };
# Add a udev rule to prevent the mouse from waking the system. Note that it # Add a udev rule to prevent the mouse from waking the system. Note that it