remove unused sane-mount-* helpers

This commit is contained in:
Colin 2023-07-02 23:01:56 +00:00
parent 3961923599
commit 9546908dbf
5 changed files with 5 additions and 90 deletions

View File

@ -77,34 +77,6 @@ in
# };
sane.fs."/mnt/servo-media" = sane-lib.fs.wantedSymlinkTo "/mnt/servo-nfs/media";
fileSystems."/mnt/servo-media-wan" = {
device = "colin@uninsane.org:/var/lib/uninsane/media";
fsType = "fuse.sshfs";
options = fsOpts.sshColin ++ fsOpts.noauto;
noCheck = true;
};
sane.fs."/mnt/servo-media-wan" = sane-lib.fs.wantedDir;
fileSystems."/mnt/servo-media-lan" = {
device = "colin@servo:/var/lib/uninsane/media";
fsType = "fuse.sshfs";
options = fsOpts.sshColin ++ fsOpts.noauto;
noCheck = true;
};
sane.fs."/mnt/servo-media-lan" = sane-lib.fs.wantedDir;
fileSystems."/mnt/servo-root-wan" = {
device = "colin@uninsane.org:/";
fsType = "fuse.sshfs";
options = fsOpts.sshRoot ++ fsOpts.noauto;
noCheck = true;
};
sane.fs."/mnt/servo-root-wan" = sane-lib.fs.wantedDir;
fileSystems."/mnt/servo-root-lan" = {
device = "colin@servo:/";
fsType = "fuse.sshfs";
options = fsOpts.sshRoot ++ fsOpts.noauto;
noCheck = true;
};
sane.fs."/mnt/servo-root-lan" = sane-lib.fs.wantedDir;
fileSystems."/mnt/desko-home" = {
device = "colin@desko:/home/colin";
fsType = "fuse.sshfs";

View File

@ -107,16 +107,6 @@ let
pname = "sane-ip-reconnect";
src = ./src;
};
mount-servo = static-nix-shell.mkBash {
pname = "sane-mount-servo";
src = ./src;
pkgs = [ "coreutils-full" ];
};
mount-servo-root = static-nix-shell.mkBash {
pname = "sane-mount-servo-root";
src = ./src;
pkgs = [ "coreutils-full" ];
};
private-change-passwd = static-nix-shell.mkBash {
pname = "sane-private-change-passwd";
src = ./src;
@ -203,7 +193,7 @@ let
sync-from-servo = static-nix-shell.mkBash {
pname = "sane-sync-from-servo";
src = ./src;
pkgs = [ "rsync" "sane-scripts.mount-servo" ];
pkgs = [ "rsync" ];
};
vpn-down = static-nix-shell.mkBash {
pname = "sane-vpn-down";

View File

@ -1,24 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils-full
#^ requires `sudo` and `mount` to be installed system-wide (suid)
set -ex
# if lan not mounted, then try to mount it
if ! (test -d /mnt/servo-media-lan/Music)
then
sudo mount /mnt/servo-media-lan
fi
# not much reason not to mount the wan while we're here.
if ! (test -d /mnt/servo-media-wan/Music)
then
sudo mount /mnt/servo-media-wan
fi
mnt=/mnt/servo-media-wan
# if the LAN is accessible, prefer that
test -d /mnt/servo-media-wan/Music && mnt=/mnt/servo-media-lan
# symlink the fastest mount point into place
# uncomment if i see the bug again: sudo unlink /mnt/servo-media # XXX ln gets confused if the destination is a symlink to a stale mount
sudo ln -sf --no-dereference $mnt /mnt/servo-media

View File

@ -1,24 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils-full
#^ requires `sudo` and `mount` to be installed system-wide (suid)
#
set -ex
# if lan not mounted, then try to mount it
if ! (test -d /mnt/servo-root-lan/nix)
then
sudo mount /mnt/servo-root-lan
fi
# not much reason not to mount the wan while we're here.
if ! (test -d /mnt/servo-root-wan/nix)
then
sudo mount /mnt/servo-root-wan
fi
mnt=/mnt/servo-root-wan
# if the LAN is accessible, prefer that
test -d /mnt/servo-root-wan/nix && mnt=/mnt/servo-root-lan
# symlink the fastest mount point into place
# uncomment if i see the bug again: sudo unlink /mnt/servo-root # XXX ln gets confused if the destination is a symlink to a stale mount
sudo ln -sf --no-dereference $mnt /mnt/servo-root

View File

@ -1,7 +1,8 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p rsync -p sane-scripts.mount-servo
#!nix-shell -i bash -p rsync
set -ex
sane-mount-servo
rsync -arv --delete --progress $mnt/Music/ ~/Music/
REMOTE_MUSIC=/mnt/servo-media/Music
test -d "$REMOTE_MUSIC" && \
rsync -arv --delete --progress "$REMOTE_MUSIC/" ~/Music/