Files
dev/src/dotfiles/registry.nix

34 lines
720 B
Nix

{
hosts,
lib,
root,
util,
}:
let
definitions = import ./registry/definitions.nix {
inherit lib root util;
};
in
{
types = lib.mapAttrs (_name: definition: definition.type) definitions;
module = {
options.registry = lib.mapAttrs (
_name: registry:
lib.mkOption {
type = lib.types.attrsOf (lib.types.attrsOf registry.type);
default = { };
description = ''
Lazily collected fleet-visible registry entries, nested by host and entry name.
'';
}
) definitions;
};
collected = import ./registry/collection.nix {
inherit definitions hosts lib;
validate = import ./registry/validation.nix { inherit definitions lib; };
};
}