about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/generic.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/kernel/generic.nix')
-rw-r--r--pkgs/os-specific/linux/kernel/generic.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix
index 2b44ff51ad0a..249a1ea5cefa 100644
--- a/pkgs/os-specific/linux/kernel/generic.nix
+++ b/pkgs/os-specific/linux/kernel/generic.nix
@@ -12,6 +12,9 @@
 , # The kernel version.
   version
 
+, # Allows overriding the default defconfig
+  defconfig ? null
+
 , # Overrides to the kernel config.
   extraConfig ? ""
 
@@ -85,7 +88,7 @@ let
 
     platformName = hostPlatform.platform.name;
     # e.g. "defconfig"
-    kernelBaseConfig = hostPlatform.platform.kernelBaseConfig;
+    kernelBaseConfig = if defconfig != null then defconfig else hostPlatform.platform.kernelBaseConfig;
     # e.g. "bzImage"
     kernelTarget = hostPlatform.platform.kernelTarget;