feat(lib): add function the concatenates paths with a prefix to a list

This commit is contained in:
madmin 2024-08-11 14:14:40 +02:00
parent 17ef59c359
commit 3c6700b030
1 changed files with 8 additions and 1 deletions

View File

@ -19,6 +19,13 @@
&& (lib.strings.hasSuffix ".nix" path) # include .nix files && (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)
];
} }