1 { config, lib, pkgs, ... }:
6 hardware.sensor.iio = {
7 enable = lib.mkOption {
9 Enable this option to support IIO sensors with iio-sensor-proxy.
11 IIO sensors are used for orientation and ambient light
12 sensors on some mobile devices.
14 type = lib.types.bool;
22 config = lib.mkIf config.hardware.sensor.iio.enable {
24 boot.initrd.availableKernelModules = [ "hid-sensor-hub" ];
26 environment.systemPackages = with pkgs; [ iio-sensor-proxy ];
28 services.dbus.packages = with pkgs; [ iio-sensor-proxy ];
29 services.udev.packages = with pkgs; [ iio-sensor-proxy ];
30 systemd.packages = with pkgs; [ iio-sensor-proxy ];