Improve server mount help with detailed instructions

- Add SSHFS section with common options explained
- Add NFS mount example
- Reference NixOS wiki for declarative mounts
- Show unmount hint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-16 22:58:19 -05:00
parent dedfbfce64
commit 13fe22a804

View File

@@ -691,10 +691,39 @@ fn doServerMount(): Unit with {Process} = {
printSuccess("Already mounted at " + serverDir)
} else {
printHeader("Mount server")
printHint("Mount a remote filesystem to access server storage:")
printHint("Mount a remote filesystem to access large files, media, and archives.")
print("")
let ignore = Process.exec("printf ' \\033[2mSSHFS:\\033[0m sshfs user@host:/path %s\\n' \"" + serverDir + "\" >&2")
let ignore2 = Process.exec("printf ' \\033[2mNFS:\\033[0m Configure in your NixOS module\\n' >&2")
// SSHFS section
printBold("SSHFS (recommended for most users)")
printHint("Mounts remote directories over SSH. No server config needed.")
print("")
printCmd("sshfs user@server:/path " + serverDir)
print("")
printHint("Useful options:")
print(" -o reconnect Auto-reconnect on connection loss")
print(" -o follow_symlinks Follow symbolic links")
print(" -o cache=yes Enable caching for better performance")
print("")
printHint("Example with options:")
printCmd("sshfs -o reconnect,cache=yes user@server:/data " + serverDir)
print("")
// NFS section
printBold("NFS (for local network)")
printHint("Faster than SSHFS but requires NFS server setup.")
print("")
printCmd("sudo mount -t nfs server:/export " + serverDir)
print("")
// NixOS section
printBold("NixOS declarative mount")
printHint("Add to configuration.nix for automatic mounting.")
printHint("See: nixos.wiki/wiki/SSHFS")
print("")
// Unmount hint
printHint("To unmount: grapho server unmount")
}
print("")
}