From 8489ccc7313a977e94b3c3871de9d96fb760d1ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 16 Jul 2025 11:18:12 +0200 Subject: [PATCH] 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 --- nixos/modules/hardware/sensor/iio.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/modules/hardware/sensor/iio.nix b/nixos/modules/hardware/sensor/iio.nix index 0f7450cf1649..dd783d5a72a2 100644 --- a/nixos/modules/hardware/sensor/iio.nix +++ b/nixos/modules/hardware/sensor/iio.nix @@ -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 ]; }; }