rsync to /run instead of /tmp #9
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: tristan/nixinate#9
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.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.