nixos/xpad-noone: init (#389752)

This commit is contained in:
misuzu 2025-03-25 11:29:52 +02:00 committed by GitHub
commit f630533b4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,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 ];
};
}