From 1db646297388d7b653a1fdb1d5f4e6f43087916a Mon Sep 17 00:00:00 2001 From: Maximilian Ehlers <2843450+b-m-f@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:45:10 +0200 Subject: [PATCH] Set type of flake option to string, correctly evaluate it when provided --- nixos-modules/host.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos-modules/host.nix b/nixos-modules/host.nix index 75df04ec..e98a091d 100644 --- a/nixos-modules/host.nix +++ b/nixos-modules/host.nix @@ -71,7 +71,7 @@ in flake = mkOption { description = "Source flake for declarative build"; - type = nullOr path; + type = nullOr str; default = null; }; @@ -174,7 +174,7 @@ in inherit (microvmConfig) flake updateFlake; isFlake = flake != null; guestConfig = if isFlake - then flake.nixosConfigurations.${name}.config + then (builtins.getFlake flake).nixosConfigurations.${name}.config else microvmConfig.config.config; runner = guestConfig.microvm.declaredRunner; in