mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
types: refactor topLevel into devices, move output generators to lib
This commit is contained in:
parent
271b00593f
commit
5aa3ebcb99
2 changed files with 66 additions and 83 deletions
14
default.nix
14
default.nix
|
|
@ -4,18 +4,18 @@ let
|
|||
eval = cfg: lib.evalModules {
|
||||
modules = lib.singleton {
|
||||
# _file = toString input;
|
||||
imports = lib.singleton { topLevel.devices = cfg; };
|
||||
imports = lib.singleton { devices = cfg; };
|
||||
options = {
|
||||
topLevel = lib.mkOption {
|
||||
type = types.topLevel;
|
||||
devices = lib.mkOption {
|
||||
type = types.devices;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
types = types;
|
||||
create = cfg: (eval cfg).config.topLevel.create;
|
||||
mount = cfg: (eval cfg).config.topLevel.mount;
|
||||
config = cfg: (eval cfg).config.topLevel.config;
|
||||
packages = cfg: (eval cfg).config.topLevel.packages;
|
||||
create = cfg: types.diskoLib.create (eval cfg).config.devices;
|
||||
mount = cfg: types.diskoLib.mount (eval cfg).config.devices;
|
||||
config = cfg: types.diskoLib.config (eval cfg).config.devices;
|
||||
packages = cfg: types.diskoLib.packages (eval cfg).config.devices;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue