summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorKira Bruneau <kira.bruneau@pm.me>2022-10-01 07:39:12 -0400
committerGitHub <noreply@github.com>2022-10-01 07:39:12 -0400
commitf185f71ed822309e2a0c45b65b02ad767efc9cc5 (patch)
treec3cf6892cf04f43f8746539a2e2cad19e7aef972 /nixos
parent33d36a5faa67846809c915e5085f71606bad16c0 (diff)
parent2a916b6c292f89a2073bff29e49c50d7fe9af2e5 (diff)
Merge pull request #192154 from kira-bruneau/linuxPackages.xpadneo
linuxPackages.xpadneo: 0.9.4 -> 0.9.5
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/hardware/xpadneo.nix2
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/xpadneo.nix18
3 files changed, 20 insertions, 1 deletions
diff --git a/nixos/modules/hardware/xpadneo.nix b/nixos/modules/hardware/xpadneo.nix
index 1e43794dc0f8..a66e81d8b15b 100644
--- a/nixos/modules/hardware/xpadneo.nix
+++ b/nixos/modules/hardware/xpadneo.nix
@@ -16,7 +16,7 @@ in
extraModprobeConfig =
mkIf
(config.hardware.bluetooth.enable &&
- (lib.versionOlder config.boot.kernelPackages.kernel.version "5.12"))
+ (lib.versionOlder config.boot.kernelPackages.kernel.version "5.12"))
"options bluetooth disable_ertm=1";
extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 5687a5332826..36c51b573100 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -678,6 +678,7 @@ in {
xfce = handleTest ./xfce.nix {};
xmonad = handleTest ./xmonad.nix {};
xmonad-xdg-autostart = handleTest ./xmonad-xdg-autostart.nix {};
+ xpadneo = handleTest ./xpadneo.nix {};
xrdp = handleTest ./xrdp.nix {};
xss-lock = handleTest ./xss-lock.nix {};
xterm = handleTest ./xterm.nix {};
diff --git a/nixos/tests/xpadneo.nix b/nixos/tests/xpadneo.nix
new file mode 100644
index 000000000000..c7b72831fce8
--- /dev/null
+++ b/nixos/tests/xpadneo.nix
@@ -0,0 +1,18 @@
+import ./make-test-python.nix ({ lib, pkgs, ... }: {
+ name = "xpadneo";
+ meta.maintainers = with lib.maintainers; [ kira-bruneau ];
+
+ nodes = {
+ machine = {
+ config.hardware.xpadneo.enable = true;
+ };
+ };
+
+ # This is just a sanity check to make sure the module was
+ # loaded. We'd have to find some way to mock an xbox controller if
+ # we wanted more in-depth testing.
+ testScript = ''
+ machine.start();
+ machine.succeed("modinfo hid_xpadneo | grep 'version:\s\+${pkgs.linuxPackages.xpadneo.version}'")
+ '';
+})