307 current 2025-02-02 19:29:41 25.05.20241217.d3c42f1 6.6.66 *
This commit is contained in:
29
home/readScripts.nix
Normal file
29
home/readScripts.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
# readScripts.nix
|
||||
# {lib, ...}: let
|
||||
# readScriptsRecursively = dir: let
|
||||
# entries = builtins.readDir dir;
|
||||
# names = builtins.attrNames entries;
|
||||
# in
|
||||
# lib.concatMap (
|
||||
# entry: let
|
||||
# fullPath = "${dir}/${entry}";
|
||||
# entryInfo = entries.${entry};
|
||||
# in
|
||||
# entryInfo
|
||||
# # if entryInfo.type == "directory"
|
||||
# # then
|
||||
# # # Recursively gather more {name, value} items
|
||||
# # readScriptsRecursively fullPath
|
||||
# # else
|
||||
# # [
|
||||
# # {
|
||||
# # name = entry;
|
||||
# # value = fullPath;
|
||||
# # }
|
||||
# # ]
|
||||
# );
|
||||
# in
|
||||
# # Return just the function for now, so you can test it easily
|
||||
# {
|
||||
# inherit readScriptsRecursively;
|
||||
# }
|
||||
Reference in New Issue
Block a user