summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2021-06-29 19:01:46 +0200
committerGitHub <noreply@github.com>2021-06-29 19:01:46 +0200
commit34d960aecb709028f2d843b22b04c79935204f42 (patch)
treee187cd2e6b40a831a4c71ab884a30278f7de0c41 /nixos
parent8f7a3c6df1ae0e04993055f0b2edcd3b86d29f43 (diff)
parent436f61c878e3992b3d980168a5532416dd5be504 (diff)
downloadnixpkgs-34d960aecb709028f2d843b22b04c79935204f42.tar
nixpkgs-34d960aecb709028f2d843b22b04c79935204f42.tar.gz
nixpkgs-34d960aecb709028f2d843b22b04c79935204f42.tar.bz2
nixpkgs-34d960aecb709028f2d843b22b04c79935204f42.tar.lz
nixpkgs-34d960aecb709028f2d843b22b04c79935204f42.tar.xz
nixpkgs-34d960aecb709028f2d843b22b04c79935204f42.tar.zst
nixpkgs-34d960aecb709028f2d843b22b04c79935204f42.zip
Merge pull request #124486 from xaverdh/linux-patch-once
nixos/boot: properly override the kernel in boot.kernelPatches
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/boot/kernel.nix6
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.