summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKira Bruneau <kira.bruneau@pm.me>2022-08-03 18:00:41 -0400
committerKira Bruneau <kira.bruneau@pm.me>2022-08-03 18:20:59 -0400
commitbda6036d2e7d6f9bd475727f861b3bede3c342ae (patch)
tree59b540dc9af6ff6b2137294aed0cb50f7e7e33e8
parentMerge pull request #184781 from r-ryantm/auto-update/xpadneo (diff)
downloadnixpkgs-bda6036d2e7d6f9bd475727f861b3bede3c342ae.tar.gz
nixos/xpadneo: don't disable ertm on kernel 5.12 or later
The [v0.9.2 changelog](https://github.com/atar-axis/xpadneo/releases/tag/v0.9.2) mentions that ERTM should no longer be unconditionally disabled on kernels later than 5.12.
-rw-r--r--nixos/modules/hardware/xpadneo.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/hardware/xpadneo.nix b/nixos/modules/hardware/xpadneo.nix
index dbc4ba212560..092f36729b31 100644
--- a/nixos/modules/hardware/xpadneo.nix
+++ b/nixos/modules/hardware/xpadneo.nix
@@ -15,7 +15,8 @@ in
# https://wiki.archlinux.org/index.php/Gamepad#Connect_Xbox_Wireless_Controller_with_Bluetooth
extraModprobeConfig =
mkIf
- config.hardware.bluetooth.enable
+ (config.hardware.bluetooth.enable &&
+ (lib.versionOlder config.boot.kernelPackages.kernel.version "5.12"))
"options bluetooth disable_ertm=1";
extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];