diff options
author | Rhys Davies <rhys@memes.nz> | 2022-02-20 12:25:42 +1300 |
---|---|---|
committer | Rhys Davies <rhys@memes.nz> | 2022-02-20 18:25:12 +1300 |
commit | 32a44aa069898adbe2e6dc4ba82d901c3c15ee71 (patch) | |
tree | 194c8be73e37f20ec3044472c065c963f93e7902 /nixos/modules/hardware | |
parent | fb69e1763e329029e615169a5f7fca9d480c46d2 (diff) | |
download | nixpkgs-32a44aa069898adbe2e6dc4ba82d901c3c15ee71.tar nixpkgs-32a44aa069898adbe2e6dc4ba82d901c3c15ee71.tar.gz nixpkgs-32a44aa069898adbe2e6dc4ba82d901c3c15ee71.tar.bz2 nixpkgs-32a44aa069898adbe2e6dc4ba82d901c3c15ee71.tar.lz nixpkgs-32a44aa069898adbe2e6dc4ba82d901c3c15ee71.tar.xz nixpkgs-32a44aa069898adbe2e6dc4ba82d901c3c15ee71.tar.zst nixpkgs-32a44aa069898adbe2e6dc4ba82d901c3c15ee71.zip |
nixos/xone: init
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r-- | nixos/modules/hardware/xone.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/nixos/modules/hardware/xone.nix b/nixos/modules/hardware/xone.nix new file mode 100644 index 00000000000..89690d8c6fb --- /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 ]; + }; +} |