From 4c2edecc43ffdb7b8d1ae80a2872e436fdd34b67 Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Wed, 21 Oct 2026 21:09:26 -0400 Subject: [PATCH] aggregateModules: Restrict pathsToLink It's not *entirely* clear if `depmod.d` is actually something we want here, but it has always been possible for module packages to add files to this, and conceptually it makes at least *some* sense, so let's leave it. --- pkgs/os-specific/linux/kmod/aggregator.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/os-specific/linux/kmod/aggregator.nix b/pkgs/os-specific/linux/kmod/aggregator.nix index ad7d3b330b7d..c32e4177e581 100644 --- a/pkgs/os-specific/linux/kmod/aggregator.nix +++ b/pkgs/os-specific/linux/kmod/aggregator.nix @@ -11,6 +11,11 @@ buildEnv { paths = modules; + pathsToLink = [ + "/lib/modules" + "/etc/depmod.d" + ]; + postBuild = '' source ${stdenvNoCC}/setup