9 Commits

Author SHA1 Message Date
d30d2efa4e Rename grapho to pal, add onboard command, fix interactive input
- Rename grapho → pal across entire codebase (CLI, NixOS module,
  flake, docs, config paths)
- Add `pal onboard` interactive setup wizard with 4 steps:
  device, config repo, sync, backups
- Shows current setup summary when re-running onboard on an
  existing installation with warnings about what will change
- Fix askConfirm/askInput to read from /dev/tty so interactive
  prompts work correctly
- Remove || operator usage in askConfirm (not reliable in Lux)
- Add pal package to nix develop shell
- Document ~/.config/pal/ directory structure in README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 22:38:37 -05:00
9c7f47e727 Ask for config repo URL instead of grapho flake URL
- setup_new: asks for Tier 2 config repo URL (personal/private)
- Automatically sets up git remote with provided URL
- Simplified join flow - no grapho URL prompt needed
- Copy config URL + age key to clipboard (not nix run commands)

The grapho flake URL is already known (user ran nix run from it).
The config repo is where personal secrets/config get stored.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 03:05:40 -05:00
2cb8c02494 Ask for grapho repo URL and copy instructions to clipboard
- Prompt for grapho flake URL and branch (defaults to master)
- Substitute into nix run commands in output
- Auto-copy instructions to clipboard (xclip/wl-copy/pbcopy)
- Apply same changes to both setup_new and setup_join

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 02:59:45 -05:00
45fc5ba08c Update instructions to show nix run syntax
Users running via nix run don't have ./setup locally,
so show the full nix run command in output messages.
Uses generic placeholder for repo URL.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 02:54:47 -05:00
9868619890 Skip GPG signing in setup script git commit
The setup script runs without a TTY in nix run, so GPG
pinentry fails. Use --no-gpg-sign for the initial commit.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 02:45:09 -05:00
5f7c7a4579 Fix age-keygen hanging due to pipe buffering
Extract public key from generated file instead of parsing
stderr through a pipe, which could cause blocking.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 02:38:13 -05:00
1a87fab2d7 Fix case-sensitive grep breaking age key generation
age-keygen outputs "Public key:" but grep was searching for
lowercase "public key", causing silent exit with pipefail.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 02:36:30 -05:00
dfc2d45cf5 Fix bash trap variable scope bug in QR camera scanner
The cleanup_camera trap handler couldn't access local variables
(ffmpeg_pid, tmpdir) when triggered, causing "unbound variable"
errors with set -u. Fixed by using global paths with $$ suffix
that the trap can reference directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 08:19:52 -05:00
5dadd584f0 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>
2026-02-13 05:08:55 -05:00