#!/usr/bin/env bash # config/post-restore.sh — custom post-restore hooks. # # Copy this file to ~/.config/ssr/post-restore.sh and add your own steps. # It is sourced by `ssr restore` after all built-in steps complete. # # Available helpers (from lib/common.sh): # ssr::log "message" — info line # ssr::ok "message" — success line # ssr::warn "message" — warning line (non-fatal) # ssr::confirm "prompt" — interactive y/N prompt # # Available variables: # SSR_ROOT — path to the ssr repository # backup_dir — cloud backup directory for this host # mackup_dir — cloud Mackup directory # # EXAMPLES # ------------------------------------------------------------------------- # --- Custom shell dep (extends SSR_SHELL_DEPS_EXTRA in ssr.conf) --------- # If you prefer the hook-file approach over ssr.conf arrays, add deps here: # # if [[ ! -d "$HOME/.my-custom-tool" ]]; then # ssr::log "Installing my-custom-tool..." # curl -sSL https://example.com/install.sh | bash # fi # --- Oh My Zsh plugins not installed via Homebrew ------------------------ # Plugins are usually git-cloned into ${ZSH_CUSTOM}/plugins. # Example: zsh-syntax-highlighting # # ZSH_CUSTOM="${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}" # if [[ -d "$HOME/.oh-my-zsh" && ! -d "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" ]]; then # git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ # "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" # fi # --- npm global packages -------------------------------------------------- # npm globals are not tracked by Homebrew; restore them here. # # if command -v npm >/dev/null 2>&1; then # npm install -g typescript prettier eslint # fi # --- macOS app configuration not covered by Mackup ----------------------- # Example: Dock position # # defaults write com.apple.dock orientation -string left # killall Dock # --- SSH key import ------------------------------------------------------- # Keys are intentionally excluded from Mackup (they are sensitive). # Restore from an encrypted backup or password manager here: # # op item get "SSH Key (personal)" --fields "private key" > "$HOME/.ssh/id_ed25519" # chmod 600 "$HOME/.ssh/id_ed25519" # --- GPG key import ------------------------------------------------------- # gpg --import /path/to/exported.gpg