mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
9 lines
389 B
Nix
9 lines
389 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" ])
|