554ed519c6
- Updated `ssr.conf.example` to clarify the usage of `SSR_CLOUD_PATH` for custom cloud providers, including examples for handling multiple folders. - Introduced `ssr::cloud::resolve_storage_pattern` function in `lib/cloud.sh` to improve directory resolution for cloud storage providers, ensuring proper handling of multiple matches. - Refactored `ssr::cloud::resolve_dir` to utilize the new storage resolution function, enhancing error handling and user feedback for cloud directory detection.
139 lines
6.5 KiB
Plaintext
139 lines
6.5 KiB
Plaintext
# ssr.conf — System Sync & Restore configuration.
|
|
# Format: simple KEY=VALUE pairs. Comments (# …) and blank lines allowed.
|
|
# This file is sourced by bash; only the keys below are recognized.
|
|
# Anything else will cause ssr to abort.
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Cloud storage
|
|
# ---------------------------------------------------------------------------
|
|
# Provider: icloud | dropbox | googledrive | onedrive | custom
|
|
SSR_CLOUD_PROVIDER=icloud
|
|
|
|
# Absolute path. Required for SSR_CLOUD_PROVIDER=custom.
|
|
# For onedrive / googledrive / dropbox: if macOS has more than one matching
|
|
# folder under ~/Library/CloudStorage (e.g. "OneDrive" and "OneDrive - Adobe"),
|
|
# you must set SSR_CLOUD_PATH to the root you want so SSR does not pick at random.
|
|
# Example (quote if the folder name contains spaces):
|
|
# SSR_CLOUD_PATH="/Users/you/Library/CloudStorage/OneDrive - Adobe"
|
|
# SSR_CLOUD_PATH=/Volumes/MyNAS/macos-sync
|
|
|
|
# Subfolder inside the cloud root for SSR data: per-host backups live under
|
|
# <cloud>/<SSR_BACKUP_SUBDIR>/<hostname> - <uuid>/. Mackup storage uses the
|
|
# same parent path; ~/.mackup.cfg sets directory=mackup (see ssr::mackup::configure).
|
|
SSR_BACKUP_SUBDIR=BACKUP
|
|
|
|
# SSR uses `mackup backup` / `mackup restore` (copy, not symlinks) for reliability
|
|
# on newer macOS. If you still have Mackup symlinks from an older setup, run:
|
|
# ssr mackup unlink
|
|
|
|
# SSR_ALLOW_CONF_OVERWRITE=yes — apply ~/.mackup.cfg updates without a TTY prompt
|
|
# (launchd / CI). Interactive runs show a diff and ask before replacing.
|
|
|
|
# Subdirs (relative to $HOME) to delete before each mackup backup attempt.
|
|
# Handles transient dirs with dangling symlinks or sockets (debug sessions,
|
|
# log dirs) that should not be copied to cloud.
|
|
# Built-in defaults: .claude/debug .cursor/logs .vscode/logs .npm/_logs
|
|
# SSR_MACKUP_PRECLEAN_PATHS=".my-app/tmp .other-app/run"
|
|
|
|
# Extra paths (relative to $HOME) to always include, space-separated.
|
|
# Example: ".easymcp .my-tool .config/my-cli"
|
|
# SSR_MACKUP_EXTRA_PATHS=""
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Homebrew behavior during `ssr sync`
|
|
# ---------------------------------------------------------------------------
|
|
SSR_BREW_UPGRADE=true
|
|
SSR_BREW_CLEANUP=true
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Unmanaged-app scan during sync
|
|
# ---------------------------------------------------------------------------
|
|
# ---------------------------------------------------------------------------
|
|
# iCloud prefetch & keep-local
|
|
# ---------------------------------------------------------------------------
|
|
# Trigger async iCloud download at sync/restore start so files are available
|
|
# before Mackup runs. Wait up to this many seconds before proceeding.
|
|
# SSR_ICLOUD_WAIT_TIMEOUT=180
|
|
|
|
# After sync, mark Mackup folder files as keep-local to prevent iCloud from
|
|
# re-evicting them before the next run (LRU touch + xattr, best-effort).
|
|
SSR_ICLOUD_KEEP_LOCAL=true
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Lists .app bundles installed manually (not via brew cask, not via MAS).
|
|
# Writes <backup_dir>/unmanaged-apps.txt for restore-time reference.
|
|
SSR_SCAN_UNMANAGED_APPS=true
|
|
|
|
# Colon-separated directories to scan (top level only).
|
|
# SSR_APP_DIRS=/Applications:$HOME/Applications
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# macOS preferences snapshot (sync + restore)
|
|
# ---------------------------------------------------------------------------
|
|
# Snapshot configured pref domains to <backup_dir>/macos-prefs/ during sync
|
|
# and replay them at the end of restore (after macos-defaults.sh).
|
|
SSR_SNAPSHOT_MACOS_PREFS=true
|
|
|
|
# Full override of the domain list (space-separated). Uncomment to replace
|
|
# the built-in default set.
|
|
# SSR_MACOS_PREF_DOMAINS="com.apple.dock com.apple.finder com.apple.symbolichotkeys com.apple.HIToolbox com.apple.spaces com.apple.menuextra.clock NSGlobalDomain"
|
|
|
|
# Append extra domains to the default set without replacing it.
|
|
# SSR_MACOS_PREF_DOMAINS_EXTRA="com.apple.universalaccess com.apple.Spotlight"
|
|
|
|
# How to resolve conflicts when restore is non-interactive (no TTY, launchd).
|
|
# "accept" = snapshot wins; "reject" = declarative macos-defaults.sh wins.
|
|
SSR_PREFS_CONFLICT_DEFAULT=accept
|
|
|
|
# Set to "true" to skip all conflict prompts and auto-accept everywhere.
|
|
# SSR_ASSUME_YES=false
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Extra installers — DMG / PKG / ZIP not available via Homebrew or MAS
|
|
# ---------------------------------------------------------------------------
|
|
# Create ~/.config/ssr/extra-installers.txt with one URL per line.
|
|
# See config/extra-installers.txt.example for the format.
|
|
# The file is automatically backed up to the cloud on every `ssr sync`.
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Shell framework auto-install (runs after mackup restore)
|
|
# ---------------------------------------------------------------------------
|
|
# Detect shell frameworks referenced in dotfiles that are not yet installed
|
|
# (e.g. oh-my-zsh, nvm, pyenv, rustup, starship, …) and install them.
|
|
# Set to "false" to skip this step.
|
|
# SSR_SHELL_DEPS_ENABLED=true
|
|
|
|
# Additional custom deps, space-separated, pipe-delimited format:
|
|
# "name|check_expression|install_command"
|
|
# Example:
|
|
# SSR_SHELL_DEPS_EXTRA=(
|
|
# "my-tool|command -v my-tool|brew install my-tool"
|
|
# "my-fw|[[ -d ~/.my-fw ]]|curl -sSL https://example.com/install.sh | bash"
|
|
# )
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# macOS restore behavior
|
|
# ---------------------------------------------------------------------------
|
|
# Disabling Gatekeeper allows apps from anywhere. Off by default.
|
|
SSR_DISABLE_GATEKEEPER=false
|
|
|
|
# Open every installed cask once after restore (for first-run config).
|
|
SSR_OPEN_CASKS=false
|
|
|
|
# Path to the macOS defaults script applied at the end of `ssr restore`.
|
|
# Leave commented to use the repo default (config/macos-defaults.sh).
|
|
# SSR_MACOS_DEFAULTS=/path/to/your/macos-defaults.sh
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Scheduling
|
|
# ---------------------------------------------------------------------------
|
|
SSR_LAUNCHD_LABEL=de.surke.ssr.sync
|
|
SSR_SCHEDULE_HOUR=9
|
|
SSR_SCHEDULE_MINUTE=0
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Paths
|
|
# ---------------------------------------------------------------------------
|
|
# SSR_STATE_DIR=$HOME/.local/state/ssr
|
|
# SSR_LOG_DIR=$HOME/.local/state/ssr/logs
|