2028508cb9
config/ssh_homelab now carries the curated alias set from ~/bin/CLAUDE.md (pve nodes, machines, key CTs, switch, tailscale hosts). Interactive auth uses a NEW key, id_ed25519_homelab, because the existing id_ed25519 is rrsync-jailed on pve173 and sshd honours the first matching authorized_keys line per key — one key can't be both a jail and a shell there. - setup.sh generates id_ed25519_homelab (idempotent) - backup.sh pins the jailed key: -o IdentitiesOnly=yes -i $HOME/.ssh/id_ed25519 - scripts/authorize-mac-key.sh (run on steel141) appends the pubkey on every LAN host via claude's aliases; wired into run.sh - bedroom alias: seth -> root (matches steel141; was undocumented) Verified from the Mac: 12 aliases land as the right user@host; the backup key is refused a shell by rrsync (checked with id — rrsync whitelists true); backup.sh still runs. Offline at push time: bedroom thinkcentre seth-pi pinail openclaw2 — re-run authorize-mac-key.sh when they're up. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
33 lines
4.2 KiB
Markdown
33 lines
4.2 KiB
Markdown
# 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 mac` alias already points at 192.168.0.94.
|
|
- 2026-09-15: Managed as `Brewfile` + idempotent `scripts/setup.sh` run over SSH from steel141 — seth is the console user so `defaults write` + `killall Dock` apply from SSH; GUI-only Tahoe toggles go in `docs/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 into `ssh -tt` raced 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-domain `launchctl 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.sh` pins the jailed key with `-i` + `IdentitiesOnly`; verify with `id`, not `true` (rrsync whitelists `true` as a ping). Key push = `scripts/authorize-mac-key.sh` from 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 (was `seth`, undocumented).
|
|
- 2026-09-15: `defaults displaysleep` on AC = 30 min, not 0 — display sleep doesn't stop Live's audio; only system `sleep` does.
|
|
|
|
## Deferred / Rejected
|
|
<!-- Decisions NOT to do something are just as valuable -- prevents re-proposing rejected ideas -->
|
|
- 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/Applications` apps REJECTED — sealed system volume; hide from Dock instead.
|
|
- 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.
|