summaryrefslogtreecommitdiffstats
path: root/cli.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-12-01 20:33:03 +0100
committerlassulus <lassulus@lassul.us>2022-12-01 20:33:03 +0100
commit25cc022282590f36ed2c3cb542774053d58dddc8 (patch)
tree2d372d2a79b3663e8653e0fc16fd436c75a12758 /cli.nix
parent0f21bc31fe237ed1c9f8fdd3a0e8be633588302a (diff)
disko cli: add --no-deps mode
Diffstat (limited to 'cli.nix')
-rw-r--r--cli.nix25
1 files changed, 18 insertions, 7 deletions
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