mirror of
https://github.com/nix-community/disko.git
synced 2024-11-04 05:44:29 +03:00
16 lines
348 B
Nix
16 lines
348 B
Nix
{ 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
|