nixos/iio: add package option

this helps with overriding the iio package in situations where overlays
are ignored i.e. when the nixpkgs.pkgs option is used for performance.

In particular we want this for
https://github.com/FrameworkComputer/linux-docs/blob/main/framework12/nixOS.md#framework-12-nixos-tweaks
This commit is contained in:
Jörg Thalheim
2025-07-16 11:18:12 +02:00
parent 5420ae11ea
commit 8489ccc731

View File

@@ -19,6 +19,8 @@
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
}; };
package = lib.mkPackageOption pkgs "iio-sensor-proxy" { };
}; };
}; };
@@ -28,10 +30,10 @@
boot.initrd.availableKernelModules = [ "hid-sensor-hub" ]; boot.initrd.availableKernelModules = [ "hid-sensor-hub" ];
environment.systemPackages = with pkgs; [ iio-sensor-proxy ]; environment.systemPackages = [ config.hardware.sensor.iio.package ];
services.dbus.packages = with pkgs; [ iio-sensor-proxy ]; services.dbus.packages = [ config.hardware.sensor.iio.package ];
services.udev.packages = with pkgs; [ iio-sensor-proxy ]; services.udev.packages = [ config.hardware.sensor.iio.package ];
systemd.packages = with pkgs; [ iio-sensor-proxy ]; systemd.packages = [ config.hardware.sensor.iio.package ];
}; };
} }