mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-10 04:49:19 -08:00
11 lines
391 B
Nix
11 lines
391 B
Nix
{ lib, tree, ... }@args: with lib;
|
|
let
|
|
wrappedBase = base: mapAttrs
|
|
(name: paths: {
|
|
imports = if isAttrs paths then attrValues paths else singleton paths;
|
|
})
|
|
(base);
|
|
in
|
|
(wrappedBase (filterAttrs (n: v: ! v ? "default") tree.dirs))
|
|
// (mapAttrs (n: v: removeAttrs v [ "default" ]) (filterAttrs (n: v: v ? "default") tree.dirs))
|
|
// (removeAttrs tree.files [ "default" ])
|