Regenerated
This commit is contained in:
+8
-6
@@ -291,19 +291,21 @@ This copies stuff to the user home-folder
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Absolute path to your assets folder
|
||||
homeDir = config.home.homeDirectory or "/home/${username}";
|
||||
assetPath = ../../../assets/copy_2_home;
|
||||
in
|
||||
{
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
# Activation script: run after Home Manager writes everything else
|
||||
# This runs after everything else
|
||||
home.activation.copyAssets = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
echo "Copying assets from ${assetPath} to home directory..."
|
||||
echo "Copying assets from ${assetPath} to ${homeDir} ..."
|
||||
|
||||
# Recursively copy all files and directories, overwrite existing files
|
||||
rsync -a --delete "${assetPath}/" "$HOME/"
|
||||
# Ensure the destination exists
|
||||
mkdir -p "${homeDir}"
|
||||
|
||||
# Copy all files and directories recursively, overwrite existing
|
||||
cp -rT "${assetPath}" "${homeDir}"
|
||||
|
||||
echo "Done copying assets."
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user