diff --git a/nixos-modules/microvm/options.nix b/nixos-modules/microvm/options.nix index 7b2f35de..dc40d05b 100644 --- a/nixos-modules/microvm/options.nix +++ b/nixos-modules/microvm/options.nix @@ -614,7 +614,24 @@ in firecracker.extraConfig = mkOption { type = types.submodule { - freeformType = (pkgs.formats.json {}).type; + freeformType = + # vendored (pkgs.formats.json {}).type to avoid pkgs dependency and eval failure in search's + with types; + let + baseType = oneOf [ + bool + int + float + str + path + (attrsOf valueType) + (listOf valueType) + ]; + valueType = nullOr baseType // { + description = "JSON value"; + }; + in + valueType; }; default = {}; description = "Extra config to merge into Firecracker JSON configuration";