1{
2 config,
3 lib,
4 ...
5}:
6
7let
8 cfg = config.hardware.xpad-noone;
9in
10{
11 options.hardware.xpad-noone = {
12 enable = lib.mkEnableOption "The Xpad driver from the Linux kernel with support for Xbox One controllers removed";
13 };
14
15 config = lib.mkIf cfg.enable {
16 boot = {
17 blacklistedKernelModules = [ "xpad" ];
18 extraModulePackages = with config.boot.kernelPackages; [ xpad-noone ];
19 };
20 };
21
22 meta = {
23 maintainers = with lib.maintainers; [ Cryolitia ];
24 };
25}