Regenerated

This commit is contained in:
2026-03-22 14:15:59 +00:00
parent 3e982c1a02
commit 10b17ac6a2
32 changed files with 6 additions and 1595 deletions
@@ -1,37 +0,0 @@
{ config, pkgs, lib, flakeRoot, ... }:
let
username = config.users.users.defaultUser or "henrov";
homeDir = "/home/${username}";
assetPath = "${flakeRoot}/assets/copy_2_home";
in
{
environment.systemPackages = [ pkgs.rsync ];
systemd.user.services.copyAssets = {
enable = true;
description = "Copy assets to home directory";
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "oneshot";
};
script = ''
echo "Copying assets from ${assetPath} to ${homeDir} ..."
if [ ! -d "${assetPath}" ]; then
echo "ERROR: ${assetPath} does not exist"
exit 1
fi
mkdir -p "${homeDir}"
${pkgs.rsync}/bin/rsync -a --no-owner --no-group "${assetPath}/" "${homeDir}/"
echo "Done copying assets."
'';
};
}