disko/default.nix

22 lines
583 B
Nix
Raw Normal View History

{ lib ? import <nixpkgs/lib> }:
2022-08-24 22:24:33 +02:00
let
types = import ./types.nix { inherit lib; };
eval = cfg: lib.evalModules {
modules = lib.singleton {
# _file = toString input;
imports = lib.singleton { topLevel.devices = cfg; };
options = {
topLevel = lib.mkOption {
type = types.topLevel;
};
};
2022-08-25 15:08:26 +02:00
};
};
in {
types = types;
create = cfg: (eval cfg).config.topLevel.create;
mount = cfg: (eval cfg).config.topLevel.mount;
config = cfg: (eval cfg).config.topLevel.config;
2022-10-21 22:25:20 +02:00
packages = cfg: (eval cfg).config.topLevel.packages;
2018-09-11 20:52:12 +02:00
}