Compatibility, bringing Sumireko into the fold. Deprecate katexprs.

This commit is contained in:
kat 2022-04-12 13:25:56 +01:00 committed by kat
parent efae399c70
commit 40edeef897
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
39 changed files with 879 additions and 175 deletions

View file

@ -0,0 +1,13 @@
{ lib }: { folder, defaultFile ? "default.nix", folderPaths ? [ ] }: with lib; let
defaultFileFinal =
if (defaultFile == "default.nix" && folder == "hosts") then
"nixos.nix"
else defaultFile;
folderModLists = map
(folderPath: modList {
modulesDir = folderPath;
defaultFile = defaultFileFinal;
})
(filter builtins.pathExists folderPaths);
in
foldl modListMerge { } folderModLists