Skip to content

Commit 4737709

Browse files
options: remove pkgs as a requirement to build options.json
1 parent 9b8e2cb commit 4737709

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

nixos-modules/microvm/options.nix

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,24 @@ in
614614

615615
firecracker.extraConfig = mkOption {
616616
type = types.submodule {
617-
freeformType = (pkgs.formats.json {}).type;
617+
freeformType =
618+
# vendored (pkgs.formats.json {}).type to avoid pkgs dependency and eval failure in search's
619+
with types;
620+
let
621+
baseType = oneOf [
622+
bool
623+
int
624+
float
625+
str
626+
path
627+
(attrsOf valueType)
628+
(listOf valueType)
629+
];
630+
valueType = nullOr baseType // {
631+
description = "JSON value";
632+
};
633+
in
634+
valueType;
618635
};
619636
default = {};
620637
description = "Extra config to merge into Firecracker JSON configuration";

0 commit comments

Comments
 (0)