summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware/xpad-noone.nix
blob: 7b33d7b1c8b08ec060102d435c1c9c7068bc21c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  config,
  lib,
  ...
}:

let
  cfg = config.hardware.xpad-noone;
in
{
  options.hardware.xpad-noone = {
    enable = lib.mkEnableOption "the Xpad driver from the Linux kernel with support for Xbox One controllers removed";
  };

  config = lib.mkIf cfg.enable {
    boot = {
      blacklistedKernelModules = [ "xpad" ];
      extraModulePackages = with config.boot.kernelPackages; [ xpad-noone ];
    };
  };

  meta = {
    maintainers = with lib.maintainers; [ Cryolitia ];
  };
}