mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 13:33:28 +01:00
add disko cli
This commit is contained in:
1 parent
324a8d5347
commit
f1531fb4f3
3 files changed
+85
-2
No files matched your search
@@ -0,0 +1,15 @@
|
||||
{ pkgs ? import <nixpkgs> {}
|
||||
, mode ? "mount"
|
||||
, diskoFile
|
||||
, ... }@args:
|
||||
let
|
||||
disko = import ./. {};
|
||||
diskFormat = import diskoFile args;
|
||||
diskoEval = if (mode == "create") then
|
||||
disko.createScript diskFormat pkgs
|
||||
else if (mode == "mount") then
|
||||
disko.mountScript diskFormat pkgs
|
||||
else
|
||||
builtins.abort "invalid mode"
|
||||
;
|
||||
in diskoEval
|
||||
Reference in new issue
Block a user