Files
STP/modules/thunderbird.sh
msaldain bd78fd9fbe Configuracion inicial completa del entorno personal
Modulos de restauracion:
- bootstrap: instala yq, age y dependencias base (curl, wget, git, nano, gpg)
- ssh: descifra e instala claves SSH desde secrets/sshKeys.tar.gz.age
- registry: aplica paquetes apt/snap/flatpak, dotfiles, servicios y configs Docker
- thunderbird: instala Thunderbird snap y restaura perfil desde ZIP
- claudeCode: configura repositorio apt de Anthropic e instala claude-code
- easyEffects: restaura configuracion y presets desde ZIP
- wireplumber: restaura dispositivo Bluetooth por defecto y perfiles de audio
- cups: restaura impresoras y drivers PPD desde ZIP

Scripts de captura (correr antes de push):
- scripts/encryptSsh.sh: cifra ~/.ssh con age
- scripts/thunderbird/capture.sh: captura perfil de Thunderbird snap
- scripts/easyEffects/capture.sh: captura config de EasyEffects flatpak
- scripts/wireplumber/capture.sh: captura estado de WirePlumber
- scripts/cups/capture.sh: captura impresoras CUPS y PPDs (requiere sudo)

Registro de aplicaciones (config/registry.yaml):
- 9 paquetes apt, 1 snap (dbeaver-ce), 22 flatpaks incluyendo VSCodium,
  Bitwarden, Inkscape, LibreOffice, OBS Studio, Nextcloud Desktop, entre otros

Secretos incluidos:
- secrets/sshKeys.tar.gz.age: claves SSH cifradas con age
- secrets/thunderbirdProfile.zip: perfil de Thunderbird sin emails ni cache
- secrets/easyEffectsConfig.zip: ajustes y presets de salida de audio
- secrets/wireplumberState.zip: estado de audio incluyendo auriculares Bluetooth
- secrets/cupsConfig.zip: 5 impresoras configuradas con sus drivers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 18:16:40 -03:00

47 lines
1.2 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
source "$stpRoot/lib/log.sh"
source "$stpRoot/lib/utils.sh"
readonly thunderbirdApplicationDirectory="$HOME/snap/thunderbird/common"
readonly thunderbirdProfileDirectory="$thunderbirdApplicationDirectory/.thunderbird"
readonly thunderbirdArchive="$stpRoot/secrets/thunderbirdProfile.zip"
thunderbirdIsInstalled() {
util::isSnapInstalled "thunderbird"
}
thunderbirdProfileExists() {
[[ -f "$thunderbirdProfileDirectory/profiles.ini" ]]
}
installThunderbird() {
sudo snap install thunderbird
log::ok "Thunderbird instalado"
}
restoreProfile() {
log::info "Restaurando perfil desde secrets/thunderbirdProfile.zip..."
mkdir -p "$thunderbirdApplicationDirectory"
unzip -qo "$thunderbirdArchive" -d "$thunderbirdApplicationDirectory"
log::ok "Perfil restaurado en: $thunderbirdProfileDirectory"
}
if thunderbirdIsInstalled; then
log::info "Thunderbird ya instalado"
else
installThunderbird
fi
if [[ ! -f "$thunderbirdArchive" ]]; then
log::info "Sin respaldo de perfil (secrets/thunderbirdProfile.zip), salteando restauración"
exit 0
fi
if thunderbirdProfileExists; then
log::info "Perfil de Thunderbird ya existe, salteando restauración"
exit 0
fi
restoreProfile