refactor(dotfiles): inline registry definitions
This commit was merged in pull request #112.
This commit is contained in:
@@ -5,9 +5,24 @@
|
||||
util,
|
||||
}:
|
||||
let
|
||||
definitions = import ./registry/definitions.nix {
|
||||
inherit lib root util;
|
||||
};
|
||||
definitions = lib.genAttrs' (util.collectNixFiles root) (
|
||||
path: lib.nameValuePair (util.removeNixSuffix path) (mkRegistry path)
|
||||
);
|
||||
|
||||
mkRegistry =
|
||||
path:
|
||||
let
|
||||
evaluated = lib.evalModules {
|
||||
specialArgs = { inherit util; };
|
||||
modules = [
|
||||
(import ./registry/schema.nix { inherit lib; })
|
||||
path
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit (evaluated.config) type replicate checks;
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
root,
|
||||
util,
|
||||
}:
|
||||
let
|
||||
definitions = lib.genAttrs' (util.collectNixFiles root) (
|
||||
path: lib.nameValuePair (util.removeNixSuffix path) (mkRegistry path)
|
||||
);
|
||||
|
||||
mkRegistry =
|
||||
path:
|
||||
let
|
||||
evaluated = lib.evalModules {
|
||||
specialArgs = { inherit util; };
|
||||
modules = [
|
||||
(import ./schema.nix { inherit lib; })
|
||||
path
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit (evaluated.config) type replicate checks;
|
||||
};
|
||||
in
|
||||
definitions
|
||||
Reference in New Issue
Block a user