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

(cherry picked from commit 8489ccc731)
This commit is contained in:
Jörg Thalheim
2025-07-16 11:18:12 +02:00
committed by github-actions[bot]
parent 4978f362d3
commit 1357ee16cb

View File

@@ -19,6 +19,8 @@
type = lib.types.bool;
default = false;
};
package = lib.mkPackageOption pkgs "iio-sensor-proxy" { };
};
};
@@ -28,10 +30,10 @@
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.udev.packages = with pkgs; [ iio-sensor-proxy ];
systemd.packages = with pkgs; [ iio-sensor-proxy ];
services.dbus.packages = [ config.hardware.sensor.iio.package ];
services.udev.packages = [ config.hardware.sensor.iio.package ];
systemd.packages = [ config.hardware.sensor.iio.package ];
};
}