2023-01-24 17:57:17 +03:00
|
|
|
{ lib ? import <nixpkgs/lib>
|
|
|
|
, rootMountPoint ? "/mnt"
|
2023-01-30 23:36:51 +03:00
|
|
|
, checked ? false
|
2023-09-26 16:57:59 +03:00
|
|
|
, diskoLib ? import ./lib { inherit lib rootMountPoint; }
|
2023-01-24 17:57:17 +03:00
|
|
|
}:
|
2022-08-24 23:24:33 +03:00
|
|
|
let
|
2022-08-29 12:45:19 +03:00
|
|
|
eval = cfg: lib.evalModules {
|
|
|
|
modules = lib.singleton {
|
|
|
|
# _file = toString input;
|
2023-03-03 10:09:13 +03:00
|
|
|
imports = lib.singleton { disko.devices = cfg.disko.devices; };
|
2022-08-29 12:45:19 +03:00
|
|
|
options = {
|
2023-03-03 10:09:13 +03:00
|
|
|
disko.devices = lib.mkOption {
|
2023-07-13 16:08:20 +03:00
|
|
|
type = diskoLib.toplevel;
|
2022-08-29 12:45:19 +03:00
|
|
|
};
|
|
|
|
};
|
2022-08-25 16:08:26 +03:00
|
|
|
};
|
|
|
|
};
|
2023-02-06 17:24:34 +03:00
|
|
|
in
|
|
|
|
{
|
2023-09-26 16:57:59 +03:00
|
|
|
lib = lib.warn "the .lib.lib output is deprecated" diskoLib;
|
2023-07-13 18:02:23 +03:00
|
|
|
|
|
|
|
# legacy alias
|
|
|
|
create = cfg: builtins.trace "the create output is deprecated, use format instead" (eval cfg).config.disko.devices._create;
|
|
|
|
createScript = cfg: pkgs: builtins.trace "the create output is deprecated, use format instead" ((eval cfg).config.disko.devices._scripts { inherit pkgs checked; }).formatScript;
|
|
|
|
createScriptNoDeps = cfg: pkgs: builtins.trace "the create output is deprecated, use format instead" ((eval cfg).config.disko.devices._scripts { inherit pkgs checked; }).formatScriptNoDeps;
|
|
|
|
|
|
|
|
format = cfg: (eval cfg).config.disko.devices._create;
|
|
|
|
formatScript = cfg: pkgs: ((eval cfg).config.disko.devices._scripts { inherit pkgs checked; }).formatScript;
|
|
|
|
formatScriptNoDeps = cfg: pkgs: ((eval cfg).config.disko.devices._scripts { inherit pkgs checked; }).formatScriptNoDeps;
|
|
|
|
|
|
|
|
mount = cfg: (eval cfg).config.disko.devices._mount;
|
|
|
|
mountScript = cfg: pkgs: ((eval cfg).config.disko.devices._scripts { inherit pkgs checked; }).mountScript;
|
|
|
|
mountScriptNoDeps = cfg: pkgs: ((eval cfg).config.disko.devices._scripts { inherit pkgs checked; }).mountScriptNoDeps;
|
|
|
|
|
|
|
|
disko = cfg: (eval cfg).config.disko.devices._disko;
|
|
|
|
diskoScript = cfg: pkgs: ((eval cfg).config.disko.devices._scripts { inherit pkgs checked; }).diskoScript;
|
|
|
|
diskoScriptNoDeps = cfg: pkgs: ((eval cfg).config.disko.devices._scripts { inherit pkgs checked; }).diskoScriptNoDeps;
|
|
|
|
|
2023-06-23 05:57:57 +03:00
|
|
|
# we keep this old output for backwards compatibility
|
2023-07-13 18:02:23 +03:00
|
|
|
diskoNoDeps = cfg: pkgs: builtins.trace "the diskoNoDeps output is deprecated, please use disko instead" ((eval cfg).config.disko.devices._scripts { inherit pkgs checked; }).diskoScriptNoDeps;
|
|
|
|
|
|
|
|
config = cfg: (eval cfg).config.disko.devices._config;
|
|
|
|
packages = cfg: (eval cfg).config.disko.devices._packages;
|
2018-09-11 21:52:12 +03:00
|
|
|
}
|