...depot, without readtree

This commit is contained in:
kat witch 2021-08-09 02:18:12 +01:00
parent d8b3918a8f
commit fbaacf54ed
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
15 changed files with 42 additions and 46 deletions

View file

@ -1,7 +1,10 @@
{ lib }: { folder, defaultFile ? "default.nix" }: with lib; let
folderNames = [ (../../config + "/${folder}") (../../config/trusted + "/${folder}") ];
defaultFileFinal = if (defaultFile == "default.nix" && folder == "hosts") then
"meta.nix"
else defaultFile;
folderModLists = map (folderName: modList {
modulesDir = folderName;
inherit defaultFile;
defaultFile = defaultFileFinal;
}) (filter builtins.pathExists folderNames);
in foldl modListMerge { } folderModLists