mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
9 lines
458 B
Nix
9 lines
458 B
Nix
{ lib }: { folder, defaultFile ? "default.nix", folderPaths ? [ (../depot + "/${folder}") (../depot/trusted + "/${folder}") ] }: with lib; let
|
|
defaultFileFinal = if (defaultFile == "default.nix" && folder == "hosts") then
|
|
"meta.nix"
|
|
else defaultFile;
|
|
folderModLists = map (folderPath: modList {
|
|
modulesDir = folderPath;
|
|
defaultFile = defaultFileFinal;
|
|
}) (filter builtins.pathExists folderPaths);
|
|
in foldl modListMerge { } folderModLists
|