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,34 @@
|
||||
# shellcheck shell=bash
|
||||
DESCRIPTION="Network storage's launchd job: mounts on login and network changes, skips servers it can't reach"
|
||||
TIER=quick
|
||||
|
||||
source "$CONNECTOR/configure.d/60-storage.sh"
|
||||
UNREACHABLE="smb://smoke@nas.smoke.invalid/files"
|
||||
|
||||
job_loaded() {
|
||||
launchctl print "gui/$(id -u)/$LABEL" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
skips_quickly() {
|
||||
local start=$SECONDS
|
||||
bash "$STORAGE_MOUNT" || return 1
|
||||
[ $((SECONDS - start)) -le 10 ]
|
||||
}
|
||||
|
||||
lists_unmounted() {
|
||||
[ "$(bash "$STORAGE_MOUNT" --list)" = "$UNREACHABLE|" ]
|
||||
}
|
||||
|
||||
scenario() {
|
||||
mkdir -p "$CONF_DIR"
|
||||
: > "$STORAGE_CONF"
|
||||
check "record adds a share and the job" record "$UNREACHABLE" "/Volumes/files"
|
||||
check "launchd has the job" job_loaded
|
||||
check "the plist names the script" plutil -lint "$PLIST"
|
||||
check "a server it can't reach is skipped, quickly and without asking" skips_quickly
|
||||
check "--list shows it as not mounted" lists_unmounted
|
||||
check_not "mounted_at doesn't find it" mounted_at "$UNREACHABLE"
|
||||
check "remove_share" remove_share "$UNREACHABLE"
|
||||
check_not "the job is gone with the last share" job_loaded
|
||||
skip "Mounting a real share needs another machine and the sign-in window: check by hand"
|
||||
}
|
||||
Reference in New Issue
Block a user