From dbef9872b0c3e46dcbb8daa1bc4c08ce7e3ddf9a Mon Sep 17 00:00:00 2001 From: Linnnus Date: Wed, 18 Sep 2024 22:24:28 +0200 Subject: muhammed: Make wraaath-sftp slightly more robust --- hosts/muhammed/wraaath-sshfs/default.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hosts/muhammed/wraaath-sshfs/default.nix') diff --git a/hosts/muhammed/wraaath-sshfs/default.nix b/hosts/muhammed/wraaath-sshfs/default.nix index 1f5f793..dcec544 100644 --- a/hosts/muhammed/wraaath-sshfs/default.nix +++ b/hosts/muhammed/wraaath-sshfs/default.nix @@ -21,12 +21,17 @@ # Should be automatically deleted upon unmount. mkdir -p /Volumes/Wraaath + # Get rid of potential leftover mount from graceless exit. + umount /Volumes/Wraaath || true + diskutil umount force /Volumes/Wraaath || true + # Start a MacFUSE daemon. # Will run in background mode, as foreground mode broke everything for some reason. exec ${pkgs.sshfs}/bin/sshfs linus@ddns.wraaath.com:/ /Volumes/Wraaath \ -p 2222 \ -o volname=Wraath \ -o reconnect \ + -o kill_on_unmount \ -o allow_other \ -o password_stdin <${config.age.secrets.wraaath-sftp-password.path} ''; -- cgit v1.2.3