From 414eefa1eeb827f4d873e21bb8ba01ce79b08683 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Wed, 18 Dec 2024 13:50:17 +0300 Subject: [PATCH] Util: Remove catText. --- lib/Util.nix | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/Util.nix b/lib/Util.nix index 132c0429..88a6dd21 100644 --- a/lib/Util.nix +++ b/lib/Util.nix @@ -14,18 +14,12 @@ # List all files in a dir. ls = path: map (f: "${path}/${f}") (builtins.attrNames (builtins.readDir path)); - # Concat all files by `text` key. - # TODO: REMOVE - catText = files: args: builtins.foldl' (acc: mod: acc + (import mod args).text) "" files; - - # Concat all file paths by `file` key. - # TODO: REMOVE + # Concat all nix file content by `file` key. catFile = files: args: builtins.foldl' (acc: mod: acc + (builtins.readFile (import mod args).file) + "\n") "" files; - # Concat all files as a set. - # TODO: REMOVE + # Concat all nix files as a set. catSet = files: args: builtins.foldl' (acc: mod: acc // mod) { } (map (file: import file args) files);