at 17.09-beta 668 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5{ 6 ###### interface 7 8 options = { 9 hardware.sensor.iio = { 10 enable = mkOption { 11 description = "Enable this option to support IIO sensors."; 12 type = types.bool; 13 default = false; 14 }; 15 }; 16 }; 17 18 ###### implementation 19 20 config = mkIf config.hardware.sensor.iio.enable { 21 22 boot.initrd.availableKernelModules = [ "hid-sensor-hub" ]; 23 24 environment.systemPackages = with pkgs; [ iio-sensor-proxy ]; 25 26 services.dbus.packages = with pkgs; [ iio-sensor-proxy ]; 27 services.udev.packages = with pkgs; [ iio-sensor-proxy ]; 28 systemd.packages = with pkgs; [ iio-sensor-proxy ]; 29 }; 30}