Set up a Mac for a Federated Core, like CoreDesktop's configure
A macOS counterpart of CoreDesktop's configure, with the same drop-in items in configure.d/: - core: Mail, Calendar and Contacts through a configuration profile, Superpanel as an app, Nextcloud files through the Nextcloud app, and Element; with test-and-fix, password change and removal - tailscale: join the Core's network through headscale - backup: restic to Nextcloud through rclone, run by launchd through an app that can be given Full Disk Access - storage: SMB shares mounted the way Finder does, again at login and on network changes - agents, claude, opencode, hermes, sandbox: install the agents and run them in Anthropic's sandbox runtime (Seatbelt on macOS) - ai-servers: LLM servers on this Mac or the network, for the agents Apps and tools macOS lacks are offered for download, checked against their makers' Team IDs and notarization, or published SHA-256 sums. Everything runs on macOS' bash 3.2 with only built-in tools. smoketest/ runs scenarios in fresh macOS VMs with Tart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# shellcheck shell=bash
|
||||
DESCRIPTION="Finding things on the network with dns-sd (the VM announces its own ssh)"
|
||||
TIER=quick
|
||||
|
||||
source "$CONNECTOR/configure.d/lib/mdns.sh"
|
||||
|
||||
finds_type() {
|
||||
mdns_types | grep -qx '_ssh._tcp'
|
||||
}
|
||||
|
||||
finds_instance() {
|
||||
[ -n "$(mdns_instances _ssh._tcp)" ]
|
||||
}
|
||||
|
||||
resolves_own_host() {
|
||||
mdns_services _ssh._tcp | cut -d'|' -f3 | grep -qixF "$(mdns_own_host)"
|
||||
}
|
||||
|
||||
quick_enough() {
|
||||
local start=$SECONDS
|
||||
run_for 2 dns-sd -B _ssh._tcp local. > /dev/null
|
||||
[ $((SECONDS - start)) -le 4 ]
|
||||
}
|
||||
|
||||
scenario() {
|
||||
step "Remote Login is on in the VM, so it announces _ssh._tcp"
|
||||
check "run_for stops dns-sd on time" quick_enough
|
||||
check "mdns_types lists _ssh._tcp (dns-sd's output comes through a pipe)" finds_type
|
||||
check "mdns_instances lists the VM's ssh" finds_instance
|
||||
check "mdns_services resolves it to this Mac's .local name ($(mdns_own_host))" resolves_own_host
|
||||
check "mdns_hosts runs (and leaves this Mac out)" bash -c \
|
||||
"source '$CONNECTOR/configure.d/lib/mdns.sh'; ! mdns_hosts | grep -qixF \"\$(mdns_own_host)\""
|
||||
}
|
||||
Reference in New Issue
Block a user