summaryrefslogtreecommitdiffstats
path: root/krebs/4lib/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/4lib/default.nix')
-rw-r--r--krebs/4lib/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix
index ca7219c7e..78f719988 100644
--- a/krebs/4lib/default.nix
+++ b/krebs/4lib/default.nix
@@ -5,6 +5,8 @@ with lib;
builtins // lib // rec {
+ eq = x: y: x == y;
+
addName = name: set:
set // { inherit name; };
@@ -22,4 +24,8 @@ builtins // lib // rec {
null = "NULL";
string = toJSON x; # close enough
}.${typeOf x};
+
+ subdirsOf = path:
+ mapAttrs (name: _: path + "/${name}")
+ (filterAttrs (_: eq "directory") (readDir path));
}