Add one-command setup with mobile QR pairing

- Add ./setup script for single-command device initialization
  - Interactive menu: new setup, join existing, or pair mobile
  - Bootstrap from git repo + age key: ./setup <url> <key>
  - Mobile pairing with live camera QR scanning

- Enhance usync with device management commands
  - usync init: bootstrap from config repo
  - usync invite: show QR for mobile
  - usync add-device: add device by ID
  - usync join: join existing setup

- Mobile/GrapheneOS optimizations
  - Live camera preview with targeting box (ffmpeg + SDL)
  - Auto-detect QR codes without manual capture
  - Syncthing pending device detection

- Simplify nix develop shell message
- Add ffmpeg, zbar, qrencode, age, sops to devShell

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-13 05:08:55 -05:00
parent 6e4ed15b1e
commit 5dadd584f0
3 changed files with 964 additions and 79 deletions

View File

@@ -94,6 +94,13 @@
restic # Backup
rclone # Cloud storage
# Setup & Pairing
qrencode # QR codes for mobile pairing
zbar # QR scanning (zbarimg)
ffmpeg # Camera preview + capture
age # Encryption for secrets
sops # Secret management
# Development
git
neovim
@@ -107,16 +114,12 @@
];
shellHook = ''
echo "Ultimate Notetaking, Sync & Backup System"
printf '\033[1m%s\033[0m\n' "Ultimate Notetaking, Sync & Backup System"
echo ""
echo "Available tools:"
echo " nb - Note-taking CLI"
echo " syncthing - File synchronization"
echo " unison - Alternative file sync"
echo " restic - Backup"
echo " rclone - Cloud storage"
echo ""
echo "Run 'nb help' to get started with notes."
echo "Get started: ./setup"
echo "Pair mobile: ./setup mobile"
echo "Sync: ./scripts/usync"
echo "Status: ./scripts/ustatus"
'';
};
}