Fixed
This commit is contained in:
@@ -10,19 +10,11 @@ in
|
|||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
partOf = [ "graphical-session.target" ];
|
partOf = [ "graphical-session.target" ];
|
||||||
script = ''
|
script = ''
|
||||||
# Remove existing Assets folder to ensure clean sync
|
# Remove existing Assets directory or symlink
|
||||||
rm -rf %h/Assets
|
${pkgs.coreutils}/bin/rm -rf %h/Assets
|
||||||
|
|
||||||
# Create the directory
|
# Create symbolic link to the assets in the Nix store
|
||||||
mkdir -p %h/Assets
|
${pkgs.coreutils}/bin/ln -s ${assetsPath} %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
|
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|||||||
Reference in New Issue
Block a user