Closed Misterio77 closed 1 year ago
No problem at all! Thank you for this awesome tool :)
could you rename
path
todirectory
Done!
Oops removed the review request by mistake, sorry
It still needs to be updated in the readme. Also, please squash the update into the previous commit.
All done :)
Great work! Thank you!
Hello, all! A huge thanks to the maintainers :), I've been using impermanence for a while and really love it.
As mentioned in https://github.com/nix-community/impermanence/issues/42, bindfs causes some issues with a few specific programs (steam, for example). I'm aware that we have options for using the NixOS module to avoid bindfs, but that may not be preferred (or possible) for some.
This PR allows for setting a specific
method
for each individual directory. They can (atm) be either "bindfs" (the default if not specified) or "symlink".I've reused the code that links files, but now it runs on
directories
that havemethod = "symlink"
as well.I made sure that changing between the two methods works reliably. For that end, I've added:
cleanEmptyLinkTargets
activation script that handles changing from bindfs to symlink. If a link's intended location has something mounted, it is unmounted (earlier than usual) and its mount point is deleted (safely withrm -d
).mount | grep
condition on the usual unmount phase, to avoid systemd trying to unmount a symlink (causes error messagens and a few seconds of hanging, although it ultimately works).~Oh, and by the way, git got a little confused with the repeated unmount code and messed up the diff. The only change I made to
mkUnmount
was adding themount | grep
check.~As we have three places with the same unmount code now, I've factored it out to a function. Diff looks fine now.
Hope this is useful, and please let me know if there's anything to be improved!
Fixes #42