Files
nixos-setup/secrets/ABOUTME.md
T
2026-10-13 20:15:16 -04:00

60 lines
2.8 KiB
Markdown

# secrets/
Age-encrypted secret files managed with [agenix](https://github.com/ryantm/agenix).
## Contents
| File | Description |
| -------------------------------------- | ------------------------------------------------- |
| `dns-addresses.conf.age` | DNS address overrides for the dnsmasq module |
| `glmain.json.age` | OpenWrt router credentials/config for `glmain` |
| `hermes-env.age` | Hermes agent env vars (fwbook + fwdesk) |
| `hermes-env` | Unencrypted working copy of `hermes-env.age` |
| `iu-project.age` | iu-project credentials (minipc1) |
| `portainer-agent-bigbox1.age` | Portainer agent env vars (bigbox1) |
| `stack1.age` | Compose definition for stack1 (minipc2) |
| `stack2.age` | Compose definition for stack2 (minipc2) |
| `buildbot-worker-password-minipc3.age` | buildbot-nix worker password (minipc3) |
| `buildbot-worker-password-fwdesk.age` | buildbot-nix worker password (fwdesk) |
| `buildbot-gitea-token.age` | Gitea access token for buildbot (minipc3) |
| `buildbot-gitea-webhook-secret.age` | Gitea webhook secret for buildbot (minipc3) |
| `buildbot-gitea-oauth-secret.age` | Gitea OAuth2 client secret for buildbot (minipc3) |
| `cloudflare-ddclient.age` | Cloudflare DNS API token for ddclient (minipc1) |
The authoritative list of names + authorized keys is `secrets.nix` in the repo root.
## ⚠️ Agent Warning
**Do not read, write, decrypt, or delete any `.age` file.**
These files are encrypted and can only be decrypted by authorized SSH keys.
Editing them outside of `agenix` will corrupt the secret.
## Workflow (for humans)
```bash
# List known secret names
skyg secrets
# Decrypt a secret for editing (writes .tmp/unencrypted-<name>)
skyg decrypt dns-addresses.conf
# Re-encrypt after editing (reads .tmp/unencrypted-<name> by default)
skyg encrypt dns-addresses.conf
# Verify your working copy matches the stored secret
skyg compare-secret dns-addresses.conf
```
**Re-keying** (e.g. after adding a host key to `secrets.nix`): there is no bulk
re-key command — for each affected secret run `skyg decrypt <name>` followed by
`skyg encrypt <name>` to re-encrypt it against the updated key set.
## Adding a New Secret
1. Add the `.age` filename and authorized public keys to `secrets.nix`
2. Create the plaintext in `.tmp/unencrypted-<name>` (or pass `--source <file>`) and run
`skyg encrypt <name>` (add `--yaml` to validate YAML before encrypting)
3. Reference it in a module via `config.age.secrets.<name>.path`
See `docs/agenix.md` for the full workflow reference.