diff --git a/hosts/perso-desktop/configuration.nix b/hosts/perso-desktop/configuration.nix index f90b50f..b5becbd 100644 --- a/hosts/perso-desktop/configuration.nix +++ b/hosts/perso-desktop/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ pkgs, lib, ... }: +{ config, pkgs, lib, ... }: { imports = @@ -51,6 +51,7 @@ graphics.amdgpu.enable = true; audio.pipewire.enable = true; printing.enable = true; + steering-wheel.enable = true; }; }; diff --git a/modules/system/hardware/default.nix b/modules/system/hardware/default.nix index 53e8473..10c8e0f 100644 --- a/modules/system/hardware/default.nix +++ b/modules/system/hardware/default.nix @@ -8,6 +8,7 @@ ./keymaps ./graphics ./printing.nix + ./steering-wheel.nix ./waydroid.nix ]; } \ No newline at end of file diff --git a/modules/system/hardware/steering-wheel.nix b/modules/system/hardware/steering-wheel.nix new file mode 100644 index 0000000..c15af15 --- /dev/null +++ b/modules/system/hardware/steering-wheel.nix @@ -0,0 +1,20 @@ +{ config, lib, ... }: + +with lib; +let + cfg = config.modules.system.hardware.steering-wheel; +in +{ + options.modules.system.hardware.steering-wheel = { + enable = mkEnableOption '' + Enable steering wheel with my custom configurations + ''; + }; + config = mkIf cfg.enable { + boot = { + blacklistedKernelModules = [ "hid-thrustmaster" ]; + kernelModules = [ "hid-tmff2" ]; + extraModulePackages = [ config.boot.kernelPackages.hid-tmff2 ]; + }; + }; +} \ No newline at end of file