updates / experimental TC setup

This commit is contained in:
2026-10-24 10:44:58 +02:00
parent 3c25fc5d41
commit d36b281a4d
48 changed files with 1147 additions and 718 deletions
+49
View File
@@ -0,0 +1,49 @@
# nixpkgs-unstable regression fix (seen on 26.11.20261020.5adc508):
#
# v4l2loopback 0.15.4 delegates `modules_install` to the kernel build
# system (`make -C $KERNEL_DIR M=$PWD modules_install`), and the kernel's
# modinst machinery runs `depmod -b $out` on its own. The nixpkgs
# expression's guard `sed -i '/depmod/d' Makefile` only strips
# v4l2loopback's OWN depmod call, so the output ships depmod-generated
# module maps (modules.alias, modules.dep, …) next to the module.
#
# Those maps collide with the kernel's own maps in pkgs.aggregateModules
# (kmod/aggregator.nix), which is a buildEnv without ignoreCollisions and
# regenerates all maps itself after merging:
#
# pkgs.buildEnv error: two given paths contain a conflicting subpath:
# `…-v4l2loopback-0.15.4/lib/modules/7.3.0/modules.alias` and
# `…-linux-7.3-modules/lib/modules/7.3.0/modules.alias`
#
# Strip the generated maps from the module output; the actual module
# (updates/*.ko*) and its kmodigest certificate (*.ko.cer) stay untouched.
#
# Applied per kernel-package alias (boot.kernelPackages.<set>) because
# top-level `linuxPackagesFor` is bypassed by the linuxKernel aliases.
#
# Drop this overlay once nixpkgs' v4l2loopback suppresses the kernel-side
# depmod again (then remove the wiring in overlays/default.nix).
{prev}: let
inherit (prev) lib;
stripDepmodMaps = old: {
postInstall =
(old.postInstall or "")
+ ''
# Remove depmod-generated maps; aggregateModules regenerates them.
rm -f $out/lib/modules/*/modules.*
'';
};
fixSet = lp:
lp.extend (
_self: super:
lib.optionalAttrs (super ? v4l2loopback) {
v4l2loopback = super.v4l2loopback.overrideAttrs stripDepmodMaps;
}
);
in {
linuxPackages = fixSet prev.linuxPackages;
linuxPackages_latest = fixSet prev.linuxPackages_latest;
}