liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 0c25983c0b9f9d1cb3e4ac1155e3dd7fe173aabd
parent c1835d97ee96031f61757b81d5e9d5120f0a65f5
Author: Daniel Barlow <dan@telent.net>
Date:   Sun, 25 Sep 2022 13:17:21 +0100

fix kconfig override

the default kconfig should be in a config stanza, not in the
default attr of the options stanza, otherwise it gets overridden
completely instead of merged

Diffstat:
Mdefault.nix | 5+++--
Mmake-kernel.nix | 2+-
Mmodules/base.nix | 2--
3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/default.nix b/default.nix @@ -5,7 +5,8 @@ let overlay = import ./overlay.nix; nixpkgs = import <nixpkgs> ( device.system // {overlays = [overlay]; }); config = (import ./merge-modules.nix) [ - (import ./modules/base.nix { inherit device; }) + ./modules/base.nix + ({ lib, ... } : { config = { inherit (device) kernel; }; }) <liminix-config> ] nixpkgs.pkgs; finalConfig = config // { @@ -15,7 +16,7 @@ let ; }; squashfs = (import ./make-image.nix) nixpkgs finalConfig; - kernel = (import ./make-kernel.nix) nixpkgs finalConfig; + kernel = (import ./make-kernel.nix) nixpkgs finalConfig.kernel.config; in { outputs = { inherit squashfs kernel; diff --git a/make-kernel.nix b/make-kernel.nix @@ -24,6 +24,6 @@ in { vmlinux = callPackage ./make-vmlinux.nix { inherit tree; - inherit (config.kernel) config;# checkedConfig; + inherit config; }; } diff --git a/modules/base.nix b/modules/base.nix @@ -1,4 +1,3 @@ -{ device } : { lib, ...}: let inherit (lib) mkEnableOption mkOption types; in { @@ -11,7 +10,6 @@ in { }; kernel = mkOption { type = types.anything; - default = { inherit (device.kernel) config checkedConfig; }; }; }; }