diff options
author | Dominik Xaver Hörl <hoe.dom@gmx.de> | 2021-05-26 13:38:08 +0200 |
---|---|---|
committer | Dominik Xaver Hörl <hoe.dom@gmx.de> | 2021-05-31 12:10:19 +0200 |
commit | 436f61c878e3992b3d980168a5532416dd5be504 (patch) | |
tree | 3346e782a5448b226aedcc660a0605931e76a98e /nixos/modules/system/boot/kernel.nix | |
parent | 339a49503ae85b6cfd110b248010d24252d7aa45 (diff) | |
download | nixpkgs-436f61c878e3992b3d980168a5532416dd5be504.tar nixpkgs-436f61c878e3992b3d980168a5532416dd5be504.tar.gz nixpkgs-436f61c878e3992b3d980168a5532416dd5be504.tar.bz2 nixpkgs-436f61c878e3992b3d980168a5532416dd5be504.tar.lz nixpkgs-436f61c878e3992b3d980168a5532416dd5be504.tar.xz nixpkgs-436f61c878e3992b3d980168a5532416dd5be504.tar.zst nixpkgs-436f61c878e3992b3d980168a5532416dd5be504.zip |
nixos/boot: properly override the kernel in boot.kernelPatches
Previously the code took the kernelPatches of the final derivation, which might or might not be what was passed to the derivation in the original call. The previous behaviour caused various hacks to become neccessary to avoid duplicates in kernelPatches.
Diffstat (limited to 'nixos/modules/system/boot/kernel.nix')
-rw-r--r-- | nixos/modules/system/boot/kernel.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index 363d8e47a0f..1a6a9d99d5b 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -38,11 +38,11 @@ in default = pkgs.linuxPackages; type = types.unspecified // { merge = mergeEqualOption; }; apply = kernelPackages: kernelPackages.extend (self: super: { - kernel = super.kernel.override { + kernel = super.kernel.override (originalArgs: { inherit randstructSeed; - kernelPatches = super.kernel.kernelPatches ++ kernelPatches; + kernelPatches = (originalArgs.kernelPatches or []) ++ kernelPatches; features = lib.recursiveUpdate super.kernel.features features; - }; + }); }); # We don't want to evaluate all of linuxPackages for the manual # - some of it might not even evaluate correctly. |