Regenerated

This commit is contained in:
2026-03-22 08:52:47 +00:00
parent ad772ac390
commit 487736ed17
31 changed files with 1534 additions and 0 deletions
@@ -0,0 +1,33 @@
{ lib, config, pkgs, flakeRoot, ... }:
let
# User information
username = config.defaultUser or "henrov";
homeDir = config.home.homeDirectory or "/home/${username}";
# Absolute path to your assets folder
assetPath = "${flakeRoot}/assets/copy_2_home";
in
{
_module.args.hmUsers = {
${username} = {
# Activation script runs after everything else
home.activation.copyAssets = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
echo "Copying assets from ${assetPath} to ${homeDir} ..."
if [ ! -d "${assetPath}" ]; then
echo "Error: Source directory ${assetPath} does not exist."
exit 1
fi
# Ensure home directory exists
mkdir -p "${homeDir}"
# Copy everything recursively, preserve structure, overwrite existing
rsync -a --no-owner --no-group "${assetPath}/" "${homeDir}/"
echo "Done copying assets."
'';
};
};
}