lib/brew.sh:
Define _SSR_DEPRECATED_TAPS list (homebrew/core, /cask, /services,
/test-bot, /bundle, /cask-fonts, /cask-drivers, /cask-versions).
_ssr_brew_strip_deprecated_taps removes matching 'tap "…"' lines after
dump so they never cause "Tapping X has failed!" errors on restore.
lib/macos-prefs.sh:
Add com.apple.controlcenter, com.apple.systemuiserver and
com.apple.notificationcenterui to SSR_MACOS_PREF_DOMAINS_DEFAULT so
Control Centre module toggles, menu-bar extras order and Notification
Centre widgets are included in the pref snapshot on every sync.
Also add ControlCenter to the post-import service restart list.
lib/macos.sh:
Add ControlCenter to ssr::macos::restart_ui so the menu bar and
Control Centre panel pick up restored prefs immediately after mackup.
Kill cfprefsd first in all restart sequences to flush the pref cache.
Co-authored-by: Cursor <cursoragent@cursor.com>
Adds a round-trip mechanism for macOS system preferences that are not
covered by Homebrew or Mackup (Dock layout, Finder options, global
keyboard shortcuts, input sources, Spaces config, menu-bar clock,
NSGlobalDomain).
sync: `ssr sync` exports each configured domain with `defaults export`
and writes one plist per domain to <backup_dir>/macos-prefs/. Export is
soft-fail per domain so one bad domain doesn't abort the sync. Gated by
SSR_SNAPSHOT_MACOS_PREFS=true (default on).
restore: `ssr restore` replays the snapshot with `defaults import` after
the declarative config/macos-defaults.sh runs, so the snapshot is the
last writer and wins for accepted domains. Before importing, the restore
detects domains that both the snapshot and macos-defaults.sh touch and
prompts interactively:
Domain `com.apple.dock`:
Snapshot will OVERRIDE values set by macos-defaults.sh.
[A]ccept snapshot / [r]eject (keep declarative)? [A/r]:
Non-TTY (launchd, CI) falls back to SSR_PREFS_CONFLICT_DEFAULT (default
"accept"). SSR_ASSUME_YES=true skips all prompts. After import, Dock,
Finder, SystemUIServer and cfprefsd are restarted once.
New config keys: SSR_SNAPSHOT_MACOS_PREFS, SSR_MACOS_PREF_DOMAINS,
SSR_MACOS_PREF_DOMAINS_EXTRA, SSR_PREFS_CONFLICT_DEFAULT, SSR_ASSUME_YES.
ssr-status surfaces the snapshotted-domain count.
README documents the snapshot flow, default domain table, conflict UX,
and the five new config keys.
Co-authored-by: Cursor <cursoragent@cursor.com>