fix: flakes support on disko standalone cli

This commit is contained in:
midischwarz12
2025-07-04 05:43:36 +00:00
committed by Jörg Thalheim
parent 83c4da299c
commit da6109c917
+5 -5
View File
@@ -17,11 +17,14 @@ let
hasDiskoFile = diskoFile != null; hasDiskoFile = diskoFile != null;
hasDiskoConfigFlake =
hasDiskoFile || lib.hasAttrByPath [ "diskoConfigurations" flakeAttr ] (builtins.getFlake flake);
diskoAttr = diskoAttr =
( (
if noDeps then if noDeps then
( (
if hasDiskoFile then if hasDiskoFile || hasDiskoConfigFlake then
{ {
destroy = "_cliDestroyNoDeps"; destroy = "_cliDestroyNoDeps";
format = "_cliFormatNoDeps"; format = "_cliFormatNoDeps";
@@ -50,7 +53,7 @@ let
} }
else else
( (
if hasDiskoFile then if hasDiskoFile || hasDiskoConfigFlake then
{ {
destroy = "_cliDestroy"; destroy = "_cliDestroy";
format = "_cliFormat"; format = "_cliFormat";
@@ -79,9 +82,6 @@ let
} }
).${mode}; ).${mode};
hasDiskoConfigFlake =
hasDiskoFile || lib.hasAttrByPath [ "diskoConfigurations" flakeAttr ] (builtins.getFlake flake);
hasDiskoModuleFlake = lib.hasAttrByPath [ hasDiskoModuleFlake = lib.hasAttrByPath [
"nixosConfigurations" "nixosConfigurations"
flakeAttr flakeAttr