linux: remove mentions of extraStructuredConfig & throw error

PR #431115 changed extraStructuredConfig to structuredExtraConfig to
follow the deprecation warning about `extraConfig`. However,
`extraStructuredConfig` was mentioned in several places in the docs that
weren't addressed. Also, using this would silently fail since the code
in question would still accept the old key.

This patch updates the docs accordingly and throws an error if the
code-path is reached and `extraStructuredConfig` is being used.

Changed files
+15 -8
doc
packages
nixos
modules
system
boot
pkgs
os-specific
linux
kernel
+1 -1
doc/packages/linux.section.md
···
ignoreConfigErrors = true;
autoModules = false;
kernelPreferBuiltin = true;
-
extraStructuredConfig = with lib.kernel; {
+
structuredExtraConfig = with lib.kernel; {
DEBUG_KERNEL = yes;
FRAME_POINTER = yes;
KGDB = yes;
+3 -3
nixos/modules/system/boot/kernel.nix
···
{
name = "foo";
patch = ./foo.patch;
-
extraStructuredConfig.FOO = lib.kernel.yes;
+
structuredExtraConfig.FOO = lib.kernel.yes;
features.foo = true;
}
{
···
# (required, but can be null if only config changes
# are needed)
-
extraStructuredConfig = { # attrset of extra configuration parameters without the CONFIG_ prefix
+
structuredExtraConfig = { # attrset of extra configuration parameters without the CONFIG_ prefix
FOO = lib.kernel.yes; # (optional)
}; # values should generally be lib.kernel.yes,
# lib.kernel.no or lib.kernel.module
···
extraConfig = "FOO y"; # extra configuration options in string form without the CONFIG_ prefix
# (optional, multiple lines allowed to specify multiple options)
-
# (deprecated, use extraStructuredConfig instead)
+
# (deprecated, use structuredExtraConfig instead)
}
```
+11 -4
pkgs/os-specific/linux/kernel/generic.nix
···
{
structuredExtraConfig ? { },
...
-
}:
-
{
-
settings = structuredExtraConfig;
-
}
+
}@args:
+
if args ? extraStructuredConfig then
+
throw ''
+
Passing `extraStructuredConfig` to the Linux kernel (e.g.
+
via `boot.kernelPatches` in NixOS) is not supported anymore. Use
+
`structuredExtraConfig` instead.
+
''
+
else
+
{
+
settings = structuredExtraConfig;
+
}
) kernelPatches;
# appends kernel patches extraConfig