Skip to content

Commit

Permalink
fix: missing binary in activation script
Browse files Browse the repository at this point in the history
  • Loading branch information
DaRacci authored Dec 31, 2024
1 parent d000479 commit a30d533
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions home-manager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@ let
;

mount = "${pkgs.util-linux}/bin/mount";
fusermount = "${lib.getExe' pkgs.fuse "fusermount"}"
unmountScript = mountPoint: tries: sleep: ''
triesLeft=${toString tries}
if ${mount} | grep -F ${mountPoint}' ' >/dev/null; then
while (( triesLeft > 0 )); do
if fusermount -u ${mountPoint}; then
if ${fusermount} -u ${mountPoint}; then
break
else
(( triesLeft-- ))
if (( triesLeft == 0 )); then
echo "Couldn't perform regular unmount of ${mountPoint}. Attempting lazy unmount."
fusermount -uz ${mountPoint}
${fusermount} -uz ${mountPoint}
else
sleep ${toString sleep}
fi
Expand Down

0 comments on commit a30d533

Please sign in to comment.