mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
add disko cli
This commit is contained in:
parent
324a8d5347
commit
f1531fb4f3
3 changed files with 85 additions and 2 deletions
15
cli.nix
Normal file
15
cli.nix
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue