diff --git a/cli.nix b/cli.nix index 1416aff..1a8a62c 100644 --- a/cli.nix +++ b/cli.nix @@ -17,11 +17,14 @@ let hasDiskoFile = diskoFile != null; + hasDiskoConfigFlake = + hasDiskoFile || lib.hasAttrByPath [ "diskoConfigurations" flakeAttr ] (builtins.getFlake flake); + diskoAttr = ( if noDeps then ( - if hasDiskoFile then + if hasDiskoFile || hasDiskoConfigFlake then { destroy = "_cliDestroyNoDeps"; format = "_cliFormatNoDeps"; @@ -50,7 +53,7 @@ let } else ( - if hasDiskoFile then + if hasDiskoFile || hasDiskoConfigFlake then { destroy = "_cliDestroy"; format = "_cliFormat"; @@ -79,9 +82,6 @@ let } ).${mode}; - hasDiskoConfigFlake = - hasDiskoFile || lib.hasAttrByPath [ "diskoConfigurations" flakeAttr ] (builtins.getFlake flake); - hasDiskoModuleFlake = lib.hasAttrByPath [ "nixosConfigurations" flakeAttr