mirror of
https://github.com/divnix/digga.git
synced 2024-12-23 16:11:51 +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:
parent
a008220e46
commit
7921efd17c
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user