macOS is a dev machine, and machine-setup now treats it as one
Officer on a Mac is a dev helper on a laptop somebody sits at. It is never the homelab or VPS case, so the role is not asked for there — it is `dev`, and every section that exists to make a machine a good server is skipped. Seventeen of twenty-six sections skip, listed once in MACOS_SKIP in lib/base.sh with a reason each, rather than an `if macos` threaded through each section. Most would simply fail — no systemd, no ufw, no netplan, no useradd, no /etc/ssh/sshd_config.d — but a few would SUCCEED and be wrong, which is worse: stopping a laptop from sleeping, or freezing the address of a machine that moves between networks daily. Nine run: System update, Core utils, Tailscale, Command-line tools, Git, Docker, Neovim, JavaScript runtimes, Agent CLIs. The blocker was root. Linux needs it for nearly everything; Homebrew REFUSES to run as root and says so, so the whole script under sudo would have failed at the first brew install having already taken a password. It is now required on Linux and refused on macOS, which works precisely because the macOS path skips everything that needed it. Docker is checked, not installed. Docker Desktop is a GUI app that wants opening, permissions and a running window — not a shell script's business — and colima and lima both cost an evening the first time something does not resolve. So the step reports whether the daemon answers and points at the download otherwise. The group-vs-rootless choice below it is Linux only: Desktop runs containers in a VM owned by whoever is logged in, so there is no group to join. Added the Xcode command line tools as a macOS-only step, before anything that builds. node-pty ships no prebuilt binary on any platform and always falls through to node-gyp, so `bun install` cannot finish without a compiler — and it fails deep in a dependency tree naming neither Xcode nor node-pty. `xcode-select --install` opens a dialogue and returns immediately, so the step says to come back rather than pretending to have waited. Tailscale takes the cask, not install.sh — that script is a Linux package-manager wrapper. The cask ships a usable CLI; the Mac App Store build is sandboxed and does not. Not run on a Mac. There isn't one here, so this is read from the code and from what each tool documents, not observed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -104,8 +104,8 @@ pkgs_core() {
|
||||
;;
|
||||
brew)
|
||||
# curl, unzip and the TLS roots ship with macOS; the compilers come from
|
||||
# the Xcode command line tools, which is not a formula.
|
||||
echo gnupg git jq wget btop htop tree tmux ripgrep fd
|
||||
# the Xcode command line tools, which is not a formula — see xcode_clt_*.
|
||||
echo gnupg git jq wget btop htop tree ripgrep fd
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -262,3 +262,23 @@ summarise_last() {
|
||||
SUMMARY+=("$label installed: ${LAST_INSTALLED[*]} (${#LAST_KEPT[@]} already present)")
|
||||
fi
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# The Xcode command line tools
|
||||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
# macOS's build-essential, and not installable as a formula. It matters here for
|
||||
# one specific reason: node-pty ships no prebuilt binary for any platform, so
|
||||
# `bun install` always falls through to node-gyp and needs a working compiler.
|
||||
# Without this the platform install fails deep inside a dependency tree with an
|
||||
# error that names neither Xcode nor node-pty.
|
||||
#
|
||||
# `xcode-select --install` opens a GUI dialogue and returns immediately — it does
|
||||
# not block until the download finishes. So this asks, and then says to come back,
|
||||
# rather than pretending to have waited.
|
||||
|
||||
xcode_clt_installed() { xcode-select -p &>/dev/null; }
|
||||
|
||||
xcode_clt_install() {
|
||||
xcode-select --install 2>/dev/null || true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user