This commit is contained in:
2025-12-29 20:40:47 -07:00
parent 53da378e59
commit f1a60d33ce

View File

@@ -10,19 +10,11 @@ in
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
script = ''
# Remove existing Assets folder to ensure clean sync
rm -rf %h/Assets
# Remove existing Assets directory or symlink
${pkgs.coreutils}/bin/rm -rf %h/Assets
# Create the directory
mkdir -p %h/Assets
# Copy contents from the nix store to the home directory
# -L dereferences symlinks (if any)
# --no-preserve=mode,ownership to ensure the user owns the files and can write to them
${pkgs.coreutils}/bin/cp -rL --no-preserve=mode,ownership ${assetsPath}/* %h/Assets/
# Ensure permissions are correct (u+rw)
chmod -R u+rw %h/Assets
# Create symbolic link to the assets in the Nix store
${pkgs.coreutils}/bin/ln -s ${assetsPath} %h/Assets
'';
serviceConfig = {
Type = "oneshot";