mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
Ostara rework - extend domainMerge
This commit is contained in:
parent
a9b7332d3c
commit
2c512aeb7b
10 changed files with 34 additions and 22 deletions
|
|
@ -1,10 +1,9 @@
|
|||
{ lib }: { folder, defaultFile ? "default.nix" }: with lib; let
|
||||
folderNames = [ (../../depot + "/${folder}") (../../depot/trusted + "/${folder}") ];
|
||||
{ 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 (folderName: modList {
|
||||
modulesDir = folderName;
|
||||
folderModLists = map (folderPath: modList {
|
||||
modulesDir = folderPath;
|
||||
defaultFile = defaultFileFinal;
|
||||
}) (filter builtins.pathExists folderNames);
|
||||
}) (filter builtins.pathExists folderPaths);
|
||||
in foldl modListMerge { } folderModLists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue