From 237107734f46f89ec8053e8b7e21d35a52ff8cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 10 Dec 2025 17:08:06 +0100 Subject: [PATCH] options: remove pkgs as a requirement to build options.json --- nixos-modules/microvm/options.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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";