Regenerated
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
homeDir = config.home.homeDirectory or "/home/${username}";
|
||||
assetPath = ../../../assets/copy_2_home;
|
||||
in
|
||||
{
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
# This runs after everything else
|
||||
home.activation.copyAssets = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
echo "Copying assets from ${assetPath} to ${homeDir} ..."
|
||||
|
||||
# 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