mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
fix: flakes support on disko standalone cli
This commit is contained in:
1 parent
83c4da299c
commit
da6109c917
1 file changed
+5
-5
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user