feat: init

This commit is contained in:
Nick 2025-03-29 23:08:26 -05:00
commit 96c6f790fc
804 changed files with 33411 additions and 0 deletions

23
modules/helpers.nix Executable file
View file

@ -0,0 +1,23 @@
{
directoryImport =
let
collectDirs =
path:
let
content = builtins.readDir path;
subdirs = builtins.filter (name: content.${name} == "directory") (builtins.attrNames content);
buildPath = name: path + "/${name}";
thisDirs = map buildPath subdirs;
subDirs = builtins.concatMap collectDirs thisDirs;
in
[ path ] ++ subDirs;
in
path:
builtins.listToAttrs (
map (dir: {
name = baseNameOf (toString dir);
value = import dir;
}) (collectDirs path)
);
}