disko cli: add --no-deps mode

This commit is contained in:
lassulus committed 2022-12-01 20:33:03 +01:00
1 parent 0f21bc31fe
commit 25cc022282
3 files changed
+38 -8

No files matched your search

+18 -7
View File
@@ -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