1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-23 08:02:21 +03:00

importHosts: output under the hosts attribute

This means the functions output can be used as a module and imported in
mkFlake arguments
This commit is contained in:
Pacman99 2021-05-13 16:52:58 -07:00 committed by Parthiv Seetharaman
parent a008220e46
commit 7921efd17c

View File

@ -54,10 +54,13 @@ in
map fullPath (lib.attrNames (lib.safeReadDir dir));
importHosts = dir:
recImport {
inherit dir;
_import = base: {
modules = import "${toString dir}/${base}.nix";
{
# Meant to output a module that sets the hosts option
hosts = recImport {
inherit dir;
_import = base: {
modules = import "${toString dir}/${base}.nix";
};
};
};
}