11 hardware.sensor.iio = {
12 enable = lib.mkOption {
14 Enable this option to support IIO sensors with iio-sensor-proxy.
16 IIO sensors are used for orientation and ambient light
17 sensors on some mobile devices.
19 type = lib.types.bool;
27 config = lib.mkIf config.hardware.sensor.iio.enable {
29 boot.initrd.availableKernelModules = [ "hid-sensor-hub" ];
31 environment.systemPackages = with pkgs; [ iio-sensor-proxy ];
33 services.dbus.packages = with pkgs; [ iio-sensor-proxy ];
34 services.udev.packages = with pkgs; [ iio-sensor-proxy ];
35 systemd.packages = with pkgs; [ iio-sensor-proxy ];