mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-23 18:12:39 +00:00
feat: integrate system config
This commit is contained in:
29
modules/nixos/hid-fanatecff/default.nix
Normal file
29
modules/nixos/hid-fanatecff/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.hardware.hid-fanatecff;
|
||||
kernel = config.boot.kernelPackages.kernel;
|
||||
fanatecKernelModule = pkgs.callPackage (import ./hid-fanatecff-module.nix) {kernel = kernel;};
|
||||
in {
|
||||
options.hardware.hid-fanatecff = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mkDoc ''
|
||||
Enables the Linux module drivers for Fanatec wheel bases.
|
||||
Works with the CSL Elite, and has experimental support
|
||||
for the ClubSport V2/V2.5, Podium DD1/DD2, CSR Elite and the CSL DD.
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot = {
|
||||
extraModulePackages = [fanatecKernelModule];
|
||||
kernelModules = ["hid-fanatecff"];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user