1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-26 11:39:44 +01:00
nixos-hardware/gpd/win-max-2/2023/bmi260/default.nix
2024-10-19 09:47:07 +00:00

36 lines
605 B
Nix

{ config, lib, ... }:
with lib;
let
bmi260 = config.boot.kernelPackages.callPackage ./package.nix { };
in
{
meta.maintainers = [ maintainers.Cryolitia ];
###### interface
options = {
hardware.sensor.iio.bmi260.enable = mkOption {
default = false;
type = types.bool;
description = ''
Enable Bosch BMI260 IMU kernel module driver.
'';
};
};
###### implementation
config = mkIf config.hardware.sensor.iio.bmi260.enable {
boot.extraModulePackages = [ bmi260 ];
boot.kernelModules = [
"bmi260_core"
"bmi260_i2c"
];
};
}