diff --git a/nixos/lib/eval-config-minimal.nix b/nixos/lib/eval-config-minimal.nix index d45b9ffd42618..e37df561ac889 100644 --- a/nixos/lib/eval-config-minimal.nix +++ b/nixos/lib/eval-config-minimal.nix @@ -40,6 +40,12 @@ let inherit prefix modules; specialArgs = { modulesPath = builtins.toString ../modules; + prepareImport = x: + # TODO https://github.com/NixOS/nix/issues/7186 + # x._type or null == "flake" + if x?sourceInfo && x?inputs && x?nixosModules.default + then x.nixosModules.default + else x; } // specialArgs; };