Add 'trivionomicon/' from commit '0ae8676d50'

git-subtree-dir: trivionomicon
git-subtree-mainline: 00d3799f90
git-subtree-split: 0ae8676d50
This commit is contained in:
chem 2025-08-25 19:10:09 -06:00
commit ad9c16de0c
50 changed files with 2091 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))