1
0
Fork 0
forked from fabian/nix

Add 'trivionomicon/' from commit 'bf39923f9c'

git-subtree-dir: trivionomicon
git-subtree-mainline: 98a32736d6
git-subtree-split: bf39923f9c
This commit is contained in:
Fabian Montero 2025-08-25 09:07:16 -06:00
commit f585491296
49 changed files with 2083 additions and 0 deletions

View file

@ -0,0 +1,21 @@
{
lib,
root,
exclude ? ["default"],
}:
with builtins;
with lib;
# http://chriswarbo.net/projects/nixos/useful_hacks.html
let
basename = removeSuffix ".nix";
isMatch = name: type:
(hasSuffix ".nix" name || type == "directory")
&& ! elem (basename name) exclude;
entry = name: _: {
name = basename name;
value = import (root + "/${name}");
};
in
mapAttrs' entry (filterAttrs isMatch (readDir root))