From 3c6700b03059bd6ef0a0ccc01db1f6c5939b8385 Mon Sep 17 00:00:00 2001 From: madmin Date: Sun, 11 Aug 2024 14:14:40 +0200 Subject: [PATCH] feat(lib): add function the concatenates paths with a prefix to a list --- lib/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/default.nix b/lib/default.nix index 1cbd641..c0079e1 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -19,6 +19,13 @@ && (lib.strings.hasSuffix ".nix" path) # include .nix files ) ) - (builtins.readDir path))); + (builtins.readDir path) + ) + ); + concatPathsWithPrefix = { prefix, path }: + builtins.concatLists + [ + (builtins.map (path: "${prefix}/${path}") paths) + ]; }