Closed MatthewCroughan closed 2 years ago
This turns out to be tricky, since we need to extract the UID of the remote, as we can't assume UID 1000
for example.
Two solutions I've come up with are to move everything to mktemp -p /dev/shm/
, or to somehow get Nix to copy the flake into the remote Nix store, such that we don't even need rsync.
On NixOS
/tmp
is not a tmpfs, so state hangs around. If the nixinate user is changed, it will try torsync
to/tmp/nixinate
where it will no longer work since the file was created by a user without the permissions of the last user that performed the deployment. This can be fixed withmktemp -p /run/user/$(id -u)
. This would make a temporary directory in/run
for the current user, which would truly be temporary.