Regenerated
This commit is contained in:
+6
-5
@@ -298,21 +298,22 @@ let
|
||||
# Helper: recursively list all files in assetPath
|
||||
recursiveListFiles = path:
|
||||
let
|
||||
entries = builtins.readDir path;
|
||||
entries = builtins.attrNames (builtins.readDir path);
|
||||
in
|
||||
concatMap (name: let full = "${path}/${name}"; in
|
||||
lib.concatMap (name:
|
||||
let full = "${path}/${name}"; in
|
||||
if builtins.isDir full
|
||||
then recursiveListFiles full
|
||||
else [ full ]
|
||||
) (builtins.attrNames entries);
|
||||
) entries;
|
||||
|
||||
# All files in the folder (full paths)
|
||||
allFiles = recursiveListFiles assetPath;
|
||||
|
||||
# Map each file to a home.file entry
|
||||
homeFiles = lib.genAttrs (allFiles) (f: {
|
||||
homeFiles = lib.genAttrs allFiles (f: {
|
||||
# Compute relative path from assetPath
|
||||
relative = builtins.substring (builtins.stringLength assetPath + 1) (builtins.stringLength f - builtins.stringLength assetPath - 1) f;
|
||||
relative = lib.strings.replaceStrings [ "${assetPath}/" ] [ "" ] f;
|
||||
name = relative; # target path in $HOME
|
||||
value = { source = f; }; # source path
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user