diff --git a/cli.nix b/cli.nix index 6af44e6..8ce034a 100644 --- a/cli.nix +++ b/cli.nix @@ -19,8 +19,8 @@ let { create = "createScriptNoDeps"; mount = "mountScriptNoDeps"; - zap_create_mount = "diskoNoDeps"; - disko = "diskoNoDeps"; + zap_create_mount = "diskoScriptNoDeps"; + disko = "diskoScriptNoDeps"; }.${mode} else { diff --git a/default.nix b/default.nix index dd42ada..8f17c65 100644 --- a/default.nix +++ b/default.nix @@ -39,7 +39,13 @@ in export PATH=${lib.makeBinPath (diskoLib.packages (eval cfg).config.disko.devices pkgs)}:$PATH ${diskoLib.zapCreateMount (eval cfg).config.disko.devices} ''; - diskoNoDeps = cfg: pkgs: (diskoLib.writeCheckedBash { inherit pkgs checked; noDeps = true; }) "disko-zap-create-mount" '' + # we keep this old output for backwards compatibility + diskoNoDeps = cfg: pkgs: builtins.trace "the .diskoNoDeps output is deprecated, plase use .diskoScriptNoDeps instead" ( + (diskoLib.writeCheckedBash { inherit pkgs checked; noDeps = true; }) "disko-zap-create-mount" '' + ${diskoLib.zapCreateMount (eval cfg).config.disko.devices} + '' + ); + diskoScriptNoDeps = cfg: pkgs: (diskoLib.writeCheckedBash { inherit pkgs checked; noDeps = true; }) "disko-zap-create-mount" '' ${diskoLib.zapCreateMount (eval cfg).config.disko.devices} ''; config = cfg: { imports = diskoLib.config (eval cfg).config.disko.devices; }; diff --git a/module.nix b/module.nix index 404468d..795900d 100644 --- a/module.nix +++ b/module.nix @@ -48,12 +48,7 @@ in ''; # we keep this old output for compatibility - system.build.disko = builtins.trace "the .disko output is deprecated, plase use .diskoScript instead" ( - (diskoLib.writeCheckedBash { inherit pkgs checked; }) "disko" '' - export PATH=${lib.makeBinPath (diskoLib.packages cfg.devices pkgs)}:$PATH - ${diskoLib.zapCreateMount cfg.devices} - '' - ); + system.build.disko = builtins.trace "the .disko output is deprecated, plase use .diskoScript instead" config.system.build.diskoScript; system.build.diskoScript = (diskoLib.writeCheckedBash { inherit pkgs checked; }) "disko" '' export PATH=${lib.makeBinPath (diskoLib.packages cfg.devices pkgs)}:$PATH @@ -69,7 +64,10 @@ in ${diskoLib.mount cfg.devices} ''; - system.build.diskoNoDeps = (diskoLib.writeCheckedBash { inherit pkgs checked; noDeps = true; }) "disko" '' + # we keep this old output for compatibility + system.build.diskoNoDeps = builtins.trace "the .diskoNoDeps output is deprecated, plase use .diskoScriptNoDeps instead" config.system.build.diskoScriptNoDeps; + + system.build.diskoScriptNoDeps = (diskoLib.writeCheckedBash { inherit pkgs checked; noDeps = true; }) "disko" '' ${diskoLib.zapCreateMount cfg.devices} '';