diff options
author | Kevin Cox <kevincox@kevincox.ca> | 2022-03-02 11:26:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-02 11:26:51 -0500 |
commit | 79862ae905e9e7e27a0aa864d70699b1897a2dfb (patch) | |
tree | 87ade36d8d2246fba61854328eba87774a939f13 /nixos | |
parent | d5bdc09f3ef9f61adc0cefbd6e8da3e20d715c5e (diff) | |
parent | 32a44aa069898adbe2e6dc4ba82d901c3c15ee71 (diff) | |
download | nixlib-79862ae905e9e7e27a0aa864d70699b1897a2dfb.tar nixlib-79862ae905e9e7e27a0aa864d70699b1897a2dfb.tar.gz nixlib-79862ae905e9e7e27a0aa864d70699b1897a2dfb.tar.bz2 nixlib-79862ae905e9e7e27a0aa864d70699b1897a2dfb.tar.lz nixlib-79862ae905e9e7e27a0aa864d70699b1897a2dfb.tar.xz nixlib-79862ae905e9e7e27a0aa864d70699b1897a2dfb.tar.zst nixlib-79862ae905e9e7e27a0aa864d70699b1897a2dfb.zip |
Merge pull request #161008 from rhysmdnz/xone
xone: init package and module
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/hardware/all-firmware.nix | 1 | ||||
-rw-r--r-- | nixos/modules/hardware/xone.nix | 23 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 |
3 files changed, 25 insertions, 0 deletions
diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix index 99bdb11b0112..5b60b17312f9 100644 --- a/nixos/modules/hardware/all-firmware.nix +++ b/nixos/modules/hardware/all-firmware.nix @@ -83,6 +83,7 @@ in { b43Firmware_5_1_138 b43Firmware_6_30_163_46 b43FirmwareCutter + xow_dongle-firmware ] ++ optional pkgs.stdenv.hostPlatform.isx86 facetimehd-firmware; }) (mkIf cfg.wirelessRegulatoryDatabase { diff --git a/nixos/modules/hardware/xone.nix b/nixos/modules/hardware/xone.nix new file mode 100644 index 000000000000..89690d8c6fb1 --- /dev/null +++ b/nixos/modules/hardware/xone.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.hardware.xone; +in +{ + options.hardware.xone = { + enable = mkEnableOption "the xone driver for Xbox One and Xbobx Series X|S accessories"; + }; + + config = mkIf cfg.enable { + boot = { + blacklistedKernelModules = [ "xpad" "mt76x2u" ]; + extraModulePackages = with config.boot.kernelPackages; [ xone ]; + }; + hardware.firmware = [ pkgs.xow_dongle-firmware ]; + }; + + meta = { + maintainers = with maintainers; [ rhysmdnz ]; + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index c6f4ec5f08c3..fd6bd087fb7d 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -91,6 +91,7 @@ ./hardware/video/switcheroo-control.nix ./hardware/video/uvcvideo/default.nix ./hardware/video/webcam/facetimehd.nix + ./hardware/xone.nix ./hardware/xpadneo.nix ./i18n/input-method/default.nix ./i18n/input-method/fcitx.nix |