engram-boot/secrets
2026-10-11 02:56:05 +02:00
..
staging feat: add bootstrap script and encrypted secrets 2026-10-11 02:56:05 +02:00
README.md feat: add bootstrap script and encrypted secrets 2026-10-11 02:56:05 +02:00
secrets.age feat: add bootstrap script and encrypted secrets 2026-10-11 02:56:05 +02:00

secrets

One encrypted bundle with everything a fresh machine needs to get online: the SSH keys and the GPG export. It is locked with age and a passphrase - that passphrase is the master key to all of it, so keep it outside this repo.

What goes in

  • ssh/nevim42-desktop, ssh/nevim42-mikoshi, ... - SSH private keys named after machines (+ their .pub; nevim42-mikoshi.pub is registered as a read-only deploy key on the engram repo)
  • ssh/known_hosts.gitea - pinned gitea host key, no TOFU on first connect
  • gpg/nevim42.asc - armored export of the GPG secret key

The bundle mirrors the staging/ structure: the folders and markers are tracked in git, the actual key material never is.

Build (or update) the bundle

staging/ is the local workbench - gitignored except for the structure. Fill it first:

cp ~/.ssh/<desktop-key>     staging/ssh/nevim42-desktop
cp ~/.ssh/<desktop-key>.pub staging/ssh/nevim42-desktop.pub
ssh-keyscan -t ed25519 gitea.nevim42.cz > staging/ssh/known_hosts.gitea
gpg --output staging/gpg/nevim42.asc --armor --export-options backup \
    --export-secret-keys nevim42@gmail.com

Then pack it - age will ask for the passphrase:

cd staging
tar czf - . | age -p -a > ../secrets.age

Commit secrets.age after any change.

Unlock

Normally bootstrap.sh does this, but by hand:

age -d secrets.age | tar xz -C /some/where