scripts/tank-automount.sh (run on the Mac, password on stdin) adds a /- direct map and root-owned /etc/auto_smb pointing at //Administrator@ 192.168.0.173/tank with soft. Mounts on first access, unmounts idle, so the laptop can leave the LAN without hung Finder or login dialogs. Findings baked in: - macOS automount does not create direct-map trigger dirs -> mkdir -p - automounted fs are always nobrowse (man auto_master): shows as a folder, not a Locations drive -> Finder Favorite (manual-checklist) - no-tty sudo ticket is per parent pid: sudo inside $(...) fails, so the idempotency check is a pipeline (sudo cmp -s -) - SMB over NFS: Mac seth is uid 501; SMB force user=root matches /mnt/Z Also: checklist Gitea key -> id_ed25519_homelab; the smb://.../tank 'user seth' step was wrong (no such Samba user) and is now the automount. Wired into run.sh. Verified: mount, root-owned write, two all-[skip] reruns. Not yet verified across a reboot (FileVault). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
5.4 KiB
DECISIONS.md — mac Decision Log
Project-specific decisions. For global/cross-cutting decisions, see ~/bin/DECISIONS.md.
Format: YYYY-MM-DD: <decision> — <why>
Architecture
- 2026-09-15: Hostname
mac— matches the short-lowercase machine naming (bebop,yoga);ssh macalias already points at 192.168.0.94. - 2026-09-15: Managed as
Brewfile+ idempotentscripts/setup.shrun over SSH from steel141 — seth is the console user sodefaults write+killall Dockapply from SSH; GUI-only Tahoe toggles go indocs/manual-checklist.md. - 2026-09-15: Backup = nightly launchd rsync (
-a --delete) of~/Music/Ableton+~/Documents->pve173:/tank/backups/mac/, with a ZFS snapshot cron on pve173 for history — rsync is transparent and Linux-familiar; the snapshot covers the--delete-mirrors-a-mistake weakness.
Implementation
-
2026-09-15: Login shell = Homebrew bash 5 (
/opt/homebrew/bin/bash) — Seth's steel141 shell is bash; Apple ships bash 3.2. zsh stays installed. -
2026-09-15: GNU coreutils/findutils/sed/grep/tar on PATH via gnubin (unprefixed) — Linux muscle memory beats BSD-compat; if a Homebrew script trips on GNU sed, fix PATH order in
~/.bash_profile, don't prefix. -
2026-09-15: Window snapping = Rectangle — zero config; AeroSpace is the upgrade if tiling turns out to matter.
-
2026-09-15: Spotlight indexing stays on, Siri/web suggestions off — Finder search is useful; Live's browser has its own index.
-
2026-09-15: iCloud account stays, iCloud Drive Desktop&Documents sync OFF — cloud sync mid-save is a DAW project killer.
-
2026-09-15: Unattended sudo = temporary
/etc/sudoers.d/mac-setup(NOPASSWD), not pty password injection. Piping the password intossh -ttraced and hung 14 min on the real run (passed a fast test). The drop-in is validated before activation, removed on every run.sh exit path, and self-destructs on the Mac after 40 min. See run.sh / _install_sudoers.sh. -
2026-09-15: Mac's backup key on pve173 is rrsync-restricted (
command="/usr/bin/rrsync /tank/backups/mac") — a travelling laptop's key must never be unrestricted root on the tank host. Proven: an interactive command over that key is refused. -
2026-09-15: Optional/cosmetic steps must be non-fatal under
set -e. The SparkFun removal (macOS refuses) and the GUI-domainlaunchctl bootstrap(flaky over SSH) both aborted the run until guarded with|| warn. Rule for this repo: anything that can legitimately fail without breaking the goal gets a best-effort guard. -
2026-09-15: Two ssh keys on the Mac:
id_ed25519(backup, rrsync-jailed) +id_ed25519_homelab(interactive,Host *default). sshd honours the first matching authorized_keys line per key, so one key can't be both jailed and a shell on pve173.backup.shpins the jailed key with-i+IdentitiesOnly; verify withid, nottrue(rrsync whiteliststrueas a ping). Key push =scripts/authorize-mac-key.shfrom steel141 (uses claude's aliases; pve nodes share/etc/pve/priv/authorized_keys, so one write covers all four). -
2026-09-15: Mac ssh aliases mirror the curated set in
~/bin/CLAUDE.md(not claude's full~/.ssh/config) — stale/undocumented entries (nixos, thinkpad-nano, mortdec-auth, vast) left out.bedroom= root, matching steel141's alias (wasseth, undocumented). -
2026-09-15: tank on the Mac = autofs + SMB (
Administrator, = root on tank) at/Volumes/tank, viascripts/tank-automount.sh— mounts on access, unmounts idle,soft: a laptop that leaves the LAN gets no hung Finder and no login-time "server unavailable" dialogs (same idea as vdj-rig'sx-systemd.automount). SMB over NFS because the Mac's seth is uid 501: NFS would write as an unknown uid and only into the 777 dirs; SMBforce user = rootmatches steel141's/mnt/Z. Cost: the password sits in root-owned/etc/auto_smb(0600) — same class as steel141's~/.smbcredentials.automountdoes not create direct-map trigger dirs, so the scriptmkdir -ps it. sudo inside$(...)loses the no-tty ticket — keep sudo in pipelines/direct calls. -
2026-09-15:
defaults displaysleepon AC = 30 min, not 0 — display sleep doesn't stop Live's audio; only systemsleepdoes.
Deferred / Rejected
- 2026-09-15: Cmd<->Ctrl global swap REJECTED — Live 12 and every Mac tutorial are Cmd-native; kitty already handles Ctrl+Shift+C/V. Karabiner per-app remaps are the fallback, not a global swap.
- 2026-09-15: yabai REJECTED — useful features need partial SIP disable. SIP/Gatekeeper/FileVault all stay on.
- 2026-09-15: Time Machine REJECTED — over SMB it's fragile and whole-disk; rsync + tank-side ZFS snapshot covers the actual need.
- 2026-09-15: Removing
/System/Applicationsapps REJECTED — sealed system volume; hide from Dock instead. - 2026-09-15: Finder "Connect to Server" + Login Item for tank REJECTED (for now) — it's the only way to get a real drive icon under Locations, but it hard-mounts: off-LAN logins throw a server dialog and a dropped network beachballs Finder for ~60 s. autofs mounts are always
nobrowse(man auto_master), so the trade is drive-icon vs roaming-safe; roaming-safe won. Revisit if Seth wants the icon. - 2026-09-15: Samples/projects on the SMB share REJECTED — local disk only; SMB is a copy source. External SSD is the capacity upgrade path.