summary refs log tree commit diff
path: root/nixos/modules/hardware/xone.nix
blob: 211d3fce8679fdb86d358c1fccb6c0919d3e0450 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ config, lib, pkgs, ... }:

with lib;
let
  cfg = config.hardware.xone;
in
{
  options.hardware.xone = {
    enable = mkEnableOption (lib.mdDoc "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 ];
  };
}