From 3bfeae1428eac1e60a304268bf7dc218f152b145 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 2 Aug 2024 07:26:38 -0400 Subject: [PATCH] ipu6: Don't build out-of-tree driver for kernels that have it --- nixos/modules/hardware/video/webcam/ipu6.nix | 6 +++--- pkgs/top-level/linux-kernels.nix | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/nixos/modules/hardware/video/webcam/ipu6.nix b/nixos/modules/hardware/video/webcam/ipu6.nix index de47fe3f6b5af..ae54e24ee2daa 100644 --- a/nixos/modules/hardware/video/webcam/ipu6.nix +++ b/nixos/modules/hardware/video/webcam/ipu6.nix @@ -26,9 +26,9 @@ in config = mkIf cfg.enable { - boot.extraModulePackages = with config.boot.kernelPackages; [ - ipu6-drivers - ]; + # Module is upstream as of 6.10 + boot.extraModulePackages = with config.boot.kernelPackages; + optional (kernelOlder "6.10") ipu6-drivers; hardware.firmware = with pkgs; [ ipu6-camera-bins diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 2854d32ef1679..8f160bbc42975 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -377,7 +377,10 @@ in { intel-speed-select = if lib.versionAtLeast kernel.version "5.3" then callPackage ../os-specific/linux/intel-speed-select { } else null; - ipu6-drivers = callPackage ../os-specific/linux/ipu6-drivers {}; + ipu6-drivers = + if kernelOlder "6.10" + then callPackage ../os-specific/linux/ipu6-drivers {} + else null; ivsc-driver = callPackage ../os-specific/linux/ivsc-driver {};