diff options
author | Naïm Favier <n@monade.li> | 2022-12-20 16:49:27 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2022-12-22 01:42:15 +0100 |
commit | a8fd50b79c899b3b4958f8bb95bb5717906a37b6 (patch) | |
tree | d3dbd014eeb9cf678103b96e0dd3ef648d0e21cc /pkgs/os-specific/linux/kernel/generic.nix | |
parent | 6c563f30fe9415fff6ab33df738a7b9ddc84cf4e (diff) |
nixos/doc: update custom kernel instructions
Document the `linux.override` way first, then `linuxManualConfig`. Add a `linux.configEnv` passthru attribute for quickly getting a `make nconfig`-ready shell.
Diffstat (limited to 'pkgs/os-specific/linux/kernel/generic.nix')
-rw-r--r-- | pkgs/os-specific/linux/kernel/generic.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 51ad268a5fe73..5a39ef9150006 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -206,6 +206,15 @@ let features = kernelFeatures; inherit commonStructuredConfig structuredExtraConfig extraMakeFlags isZen isHardened isLibre; isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true; + + # Adds dependencies needed to edit the config: + # nix-shell '<nixpkgs>' -A linux.configEnv --command 'make nconfig' + configEnv = kernel.overrideAttrs (old: { + nativeBuildInputs = old.nativeBuildInputs or [] ++ (with buildPackages; [ + pkg-config ncurses + ]); + }); + passthru = kernel.passthru // (removeAttrs passthru [ "passthru" ]); tests = let overridableKernel = finalKernel // { |