summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-04-18 18:48:54 +0200
committerlassulus <lassulus@lassul.us>2020-04-18 18:48:54 +0200
commit54827be4cce4770db0150cd8bea8b7a73d84536b (patch)
treec09892cf059df46fd19825ecbe660e5ffed8e4c8
parenteb15765624036550a9b1d9186bbadea5d937ffd8 (diff)
lib: add stripAttr
-rw-r--r--lib/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 14e6e27a3..5a948bbf3 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -49,6 +49,8 @@ let
indent = replaceChars ["\n"] ["\n "];
+ stripAttr = converge (filterAttrsRecursive (n: v: v != {} && v != null));
+
mapNixDir = f: x: {
list = foldl' mergeAttrs {} (map (mapNixDir1 f) x);
path = mapNixDir1 f x;