From 25cc022282590f36ed2c3cb542774053d58dddc8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 1 Dec 2022 20:33:03 +0100 Subject: disko cli: add --no-deps mode --- cli.nix | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'cli.nix') diff --git a/cli.nix b/cli.nix index 72a1c3c..3295346 100644 --- a/cli.nix +++ b/cli.nix @@ -3,6 +3,7 @@ , flake ? null , flakeAttr ? null , diskoFile ? null +, noDeps ? false , ... }@args: let disko = import ./. { }; @@ -12,13 +13,23 @@ let else import diskoFile args; - diskoEval = if (mode == "create") then - disko.createScript diskFormat pkgs - else if (mode == "mount") then - disko.mountScript diskFormat pkgs - else if (mode = "zap_create_mount") then - disko.zapCreateMount diskFormat pkgs + diskoEval = if noDeps then + if (mode == "create") then + disko.createScriptNoDeps diskFormat pkgs + else if (mode == "mount") then + disko.mountScriptNoDeps diskFormat pkgs + else if (mode == "zap_create_mount") then + disko.zapCreateMountScriptNoDeps diskFormat pkgs + else + builtins.abort "invalid mode" else - builtins.abort "invalid mode" + if (mode == "create") then + disko.createScript diskFormat pkgs + else if (mode == "mount") then + disko.mountScript diskFormat pkgs + else if (mode == "zap_create_mount") then + disko.zapCreateMount diskFormat pkgs + else + builtins.abort "invalid mode" ; in diskoEval -- cgit v1.2.3