Skip to content

Commit

Permalink
initrd: make bootConfig deeply mergeable
Browse files Browse the repository at this point in the history
With JSONValue from:

 * NixOS/nixpkgs#75584
  • Loading branch information
samueldr committed Jan 14, 2020
1 parent 2f08c62 commit 8b40feb
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion modules/initrd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ let
toJSON
;

JSONValue = with lib.types; let
valueType = nullOr (oneOf [
bool
int
float
str
(lazyAttrsOf valueType)
(listOf valueType)
]) // {
description = "JSON value";
emptyValue.value = {};
};
in valueType;

initWrapperRealInit = "/actual-init";

# TODO: define as an option
Expand Down Expand Up @@ -203,7 +217,7 @@ in
";
};
mobile.boot.stage-1.bootConfig = mkOption {
type = types.attrs;
type = JSONValue;
default = {};
internal = true;
description = ''
Expand Down

0 comments on commit 8b40feb

Please sign in to comment.