2024-10-13 02:10:23 +02:00
|
|
|
{ config, lib, ... }:
|
2024-02-11 07:46:44 +01:00
|
|
|
|
|
|
|
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;
|
2024-07-29 23:37:28 +02:00
|
|
|
description = ''
|
2024-02-11 07:46:44 +01:00
|
|
|
Enable Bosch BMI260 IMU kernel module driver.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = mkIf config.hardware.sensor.iio.bmi260.enable {
|
|
|
|
boot.extraModulePackages = [ bmi260 ];
|
2024-10-13 02:10:23 +02:00
|
|
|
boot.kernelModules = [
|
|
|
|
"bmi260_core"
|
|
|
|
"bmi260_i2c"
|
|
|
|
];
|
2024-02-11 07:46:44 +01:00
|
|
|
};
|
|
|
|
}
|