Fixed
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user