summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-15 00:59:00 +0200
committertv <tv@shackspace.de>2015-10-15 01:01:45 +0200
commit3a375d843ec4a6828673597810101923619a3e94 (patch)
tree055e80c680d2f50604f7cee9675815320b692886 /krebs
parent35dd3df5c6276dace7bfbd755a72a6122ecf5ae3 (diff)
krebs lib: init subdirsOf
Diffstat (limited to 'krebs')
-rw-r--r--krebs/4lib/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix
index f83be9ff8..78f719988 100644
--- a/krebs/4lib/default.nix
+++ b/krebs/4lib/default.nix
@@ -24,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));
}