linux: aggregateModules fails when external kernel modules lack .ko.cer files
Edited by @me-and to format code parts for easier reading
Nixpkgs version
- Unstable (26.11)
Describe the bug
After updating nixpkgs in my flake.lock, building my NixOS system fails while building the Linux kernel module aggregation derivation.
The relevant error is:
cat: kernel/drivers/hwmon/zenpower/zenpower.ko.cer: No such file or directory
cat: misc/acpi_call.ko.cer: No such file or directory
The failure appears related to commit 6bd752674493 ("aggregateModules: merge certificates from external modules"), which generates module certificate paths from modules.dep and tries to concatenate them into modules.cer. The kernel/module-signing change in c736bb8bdbad ("linux: generate deterministic module signatures and certificates") may also be relevant.
My configuration adds these external modules:
boot = lib.mkIf config.services.tlp.enable {
kernelModules = [ "acpi_call" ];
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
};
boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ];
Both packages are taken from config.boot.kernelPackages.
The failing derivation is: /nix/store/q04gy37ysfvpzmzvm1dqv8dqw8s1079b-linux-7.2.11-modules.drv
Steps to reproduce
Use nixpkgs 353adf2b445918e611dfe26e27876696d640f48f
Add
boot = {
kernelModules = [ "acpi_call" ];
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
};
to the config. Do nixos-rebuild switch.
Minimal reproducer
Expected behaviour
Kernel module aggregation does not fail.
Screenshots
No response
Relevant log output
❯ nix log /nix/store/q04gy37ysfvpzmzvm1dqv8dqw8s1079b-linux-7.2.11-modules.drv
structuredAttrs is enabled
created 363 symlinks in user environment
structuredAttrs is enabled
kernel version is 7.2.11
cat: kernel/drivers/hwmon/zenpower/zenpower.ko.cer: No such file or directory
cat: misc/acpi_call.ko.cer: No such file or directory
Additional context
No response
System metadata
- system:
"x86_64-linux" - host os:
Linux 7.2.10, NixOS, 26.11 (Zokor), 26.11.20261012.6aa7ad7 - multi-user?:
yes - sandbox:
yes - version:
nix-env (Nix) 2.35.3 - channels(…):
"home-manager, nixgl, nixpkgs" - channels(root):
"nixos" - nixpkgs:
/nix/store/wzd256m3cw2wihaxdky68c01h8qycipy-nixpkgs/nixpkgs
Notify maintainers
@emilazy
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
- [x] I assert that this is a bug and not a support request.
- [x] I assert that this is not a duplicate of an existing issue.
- [x] I assert that I have read the NixOS Code of Conduct and agree to abide by it.
- [x] I assert that I have read the automation/AI policy and that this issue report complies with it.
Is this issue important to you?
Add a :+1: reaction to issues you find important.
Thanks for the report. This is a bug in the linuxPackages.acpi_call and linuxPackages.zenpower packaging; they’re not going through the Kbuild module installation flow. That also means they weren’t getting compressed before.
linuxPackages.acpi_call has an upstream install target that passes through to the Kbuild modules_install, so it just needs to add "INSTALL_MOD_PATH=${placeholder "out"}" to its makeFlags, drop the explicit install(1) of the module, and move the additional one to postInstall. (It may also want "DEPMOD=true" to silence a warning, although perhaps we should put that in the global kernelModuleMakeFlags.) cc @7c6f434c @Mic92 as maintainers.
linuxPackages.zenpower needs kernelModuleMakeFlags in its makeFlags along with the same changes to it as linuxPackages.acpi_call. The upstream Makefile doesn’t expose the Kbuild install_modules target, so in addition to those, it’ll have to set installTargets = [ "modules_install" ]; and installFlags = [ "-C" "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "M=$(PWD)" ];. cc @alexbakker @Artturin as maintainers.
Another affected package: xpad-noone
Same failure as in this issue, hit on a full system build with xpad-noone in boot.extraModulePackages (together with xpadneo, xone, v4l2loopback).
nixpkgs 09063bd1f2b36fd9fd793c36dfade7bd40a93dfc (2026-10-17), kernel linux_6_18 (6.18.57) nixos-rebuild build fails in linux-6.18.57-modules.drv: xpad-noone’s installPhase copies the .ko by hand (install *.ko) instead of using modules_install, so no .ko.cer is generated.
Two more affected packages: hid-fanatecff and new-lg4ff (follow-up to my xpad-noone comment above)
Same context: nixpkgs 09063bd1f2b36fd9fd793c36dfade7bd40a93dfc (2026-10-17), linux_6_18 (6.18.57), module aggregated with aggregateModules the way nixos/modules/system/boot/kernel.nix does it.
linuxPackages.hid-fanatecff (0.2.3) builds, but its output has no .ko.cer, so aggregation fails:
It passes kernelModuleMakeFlags, but the upstream Makefile’s install target just does cp hid-fanatec.ko ${MODULEDIR} rather than going through Kbuild’s modules_install.
linuxPackages.new-lg4ff (0.5.0) doesn’t build at all. It fails in configurePhase:
Its preConfigure expands kernelModuleMakeFlags into makeFlagsArray+=( ... ) via builtins.concatStringsSep, and that list contains cmd_sign=...$(space)$@, which looks like what bash is trying to run as a command. I haven’t confirmed this beyond the log.
I couldn’t find existing issues or PRs for either (searched fanatecff, new-lg4ff, lg4ff since 2026-10-08, so the search is narrow).
had issues with ddcci as well
❯ nix log /nix/store/lxhdvqlzq6a3z6snw93vdyjw3047ifrx-linux-7.2.11-modules.drv
1 structuredAttrs is enabled
2 created 156 symlinks in user environment
3 structuredAttrs is enabled
4 kernel version is 7.2.11
5 cat: extra/ddcci-backlight.ko.cer: No such file or directory
6 cat: extra/ddcci.ko.cer: No such file or directory
I have the same problem
linux-7.2.11-modules> cat: kernel/drivers/hid/razeraccessory.ko.cer: No such file or directory
linux-7.2.11-modules> cat: kernel/drivers/hid/razermouse.ko.cer: No such file or directory
linux-7.2.11-modules> cat: kernel/drivers/hid/razerkraken.ko.cer: No such file or directory
linux-7.2.11-modules> cat: kernel/drivers/hid/razerkbd.ko.cer: No such file or directory
error: Cannot build '/nix/store/9s66gl7fgx361lcc7hfd8lsjm7qb2aaj-linux-7.2.11-modules.drv'.
Reason: builder failed with exit code 123.
Output paths:
/nix/store/d86vg24r34qq6ls0156jkhmabf8xs3qb-linux-7.2.11-modules
openrazer PR #576293
the same problem show up with framework-laptop-kmod
The virtualbox and kvmfr kernel modules seem to have the same problem:
$ nix log /nix/store/gpdz8lhx73fmp4fxjx7aa5f02dj3abnr-linux-7.3-modules.drv
structuredAttrs is enabled
created 192 symlinks in user environment
structuredAttrs is enabled
kernel version is 7.3.0
cat: misc/vboxnetflt.ko.cer: No such file or directory
cat: misc/vboxnetadp.ko.cer: No such file or directory
cat: kernel/drivers/misc/kvmfr.ko.cer: No such file or directory
cat: misc/vboxdrv.ko.cer: No such file or directory
I update flake.lock and I got this build error also: > created 292 symlinks in user environment > structuredAttrs is enabled > kernel version is 6.18.57 > cat: kernel/drivers/net/ethernet/realtek/r8125.ko.cer: No such file or directory
linuxPackages.broadcom_sta is affected too: https://github.com/NixOS/nixpkgs/pull/576651
I think we don't even need the framework-laptop-kmod any more, lts in nixos is 6.18 and that module is deprecated since 6.10.
kernelPackages.gcadapter-oc-kmod is also affected by this. Ping @r-burns
28. I think we don't even need the framework-laptop-kmod any more, lts in nixos is 6.18 and that module is deprecated since 6.10.
It's not deprecated, but since 6.14^1 the support landed on the Linux kernel mainline so removing it may make sense. Anyway, discussion about package removal should land in its own issue. Looking at commits referencing this issue I can count at least 4 people that are still using it 😄
Another affected package isyt6801 (Linux 7.3, nixos-unstable 02c087f), which nixos-hardware's TUXEDO InfinityBook modules add to boot.extraModulePackages:
cat: kernel/drivers/net/ethernet/motorcomm/yt6801.ko.cer: No such file or directory
Its output contains kernel/drivers/net/ethernet/motorcomm/yt6801.ko.xz but no .ko.cer.
- I think we don't even need the framework-laptop-kmod any more, lts in nixos is 6.18 and that module is deprecated since 6.10.
It's not deprecated, but since 6.141 the support landed on the Linux kernel mainline so removing it may make sense. Anyway, discussion about package removal should land in its own issue. Looking at commits referencing this issue I can count at least 4 people that are still using it 😄
Footnotes
1. https://community.frame.work/t/charge-levels-configurable-from-kde-userspace/69432/10 [↩](#user-content-fnref-1-0124b5c0e6e8b2b3d8795a2ad0fc0516)
Another thing too is that the framework kmod is being used in nixos-hardware, which was how I got affected by the same errors
Another thing too is that the framework kmod is being used in nixos-hardware, which was how I got affected by the same errors
I disabled it (is a flag) I think we should make a PR to it to disable it if kernel is over 6.14.
Another affected module: evdi (DisplayLink).
After updating my flake, nixos-rebuild switch fails during kernel module aggregation with a missing .ko.cer file.
Environment:
-
NixOS unstable (26.11)
-
nixpkgs revision: 02c087f
-
Kernel: 6.18.57 (upgrading from 6.18.39)
-
External module: evdi (DisplayLink)
Error
error: Cannot build '/nix/store/ka6ansx8638km41645gdkxnpjf08a4r6-linux-6.18.57-modules.drv'.
Reason: builder failed with exit code 123.
Last 5 log lines:
> structuredAttrs is enabled
> created 183 symlinks in user environment
> structuredAttrs is enabled
> kernel version is 6.18.57
> cat: kernel/drivers/gpu/drm/evdi/evdi.ko.cer: No such file or directory
This appears to be the same module certificate aggregation issue affecting other out-of-tree kernel modules.
It looks like linuxPackages.evdi may also need its module installation process updated to generate the expected certificate file through Kbuild's modules_install target.
I do fix for this modules linuxPackages.hid-fanatecff the build result look good but It my first time I do works on kernelModules. So maybe, I do something wrong.
I not have the hardware to test it but the issue is reported by my friend
Another affected module is amdgpu-i2c (from nixpkgs linuxKernel.packages.linux_ver.amdgpu-i2c).
Last 5 log lines:
> structuredAttrs is enabled
> created 22 symlinks in user environment
> structuredAttrs is enabled
> kernel version is 6.18.57
> cat: updates/amdgpu-i2c.ko.cer: No such file or directory
I'm also experiencing this on NixOS unstable, with nixpkgs revision '02c087f3fe673c9e317f206a627cb6b910336dbe' and Linux kernel '6.18.57'.
The VirtualBox build fails because 'vboxdrv.ko.cer', 'vboxnetflt.ko.cer', and 'vboxnetadp.ko.cer' are missing.