From 2b428514e551b09ba15f1dd9ea76c1b40ee801df Mon Sep 17 00:00:00 2001 From: Paul Grandperrin Date: Thu, 25 Jun 2026 17:24:49 +0200 Subject: [PATCH] linux: forward features into passthru build.nix accepted `features` as a parameter but discarded it, never placing it into the derivation's passthru. The NixOS boot.kernelPackages apply function calls kernel.override() on every evaluation, re-running build.nix from scratch; any features added via overrideAttrs were silently lost, causing assertions like hardware.graphics.enable32Bit (which checks kernel.features.ia32Emulation) to always fail for linuxManualConfig-based kernels. Change `features ? null` to `features ? {}` and add it to passthru so it survives override() call chains. --- pkgs/os-specific/linux/kernel/build.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/build.nix b/pkgs/os-specific/linux/kernel/build.nix index ac191a3ba149..91340c212afd 100644 --- a/pkgs/os-specific/linux/kernel/build.nix +++ b/pkgs/os-specific/linux/kernel/build.nix @@ -80,8 +80,7 @@ lib.makeOverridable ( # Whether to utilize the controversial import-from-derivation feature to parse the config allowImportFromDerivation ? false, - # ignored - features ? null, + features ? { }, lib ? lib_, stdenv ? stdenv_, }: @@ -530,6 +529,9 @@ lib.makeOverridable ( inherit isZen withRust + # Forwarded into passthru so features survive kernel.override() call chains + # used by the NixOS module system (see boot.kernelPackages apply in kernel.nix). + features ; baseVersion = lib.head (lib.splitString "-rc" version); kernelOlder = lib.versionOlder baseVersion;