# SOPS recipient rules.
#
# SOPS is DR-fallback only — Infisical is the active secrets backend.
# Files live in archive/secrets-sops-backup/ for cold recovery.
# To encrypt a new DR secret: sops -e archive/secrets-sops-backup/<name>.yaml
#
# To grant a DR secret to a new client: add their age public key (from
# inventory.yaml `hosts.<name>.age_pubkey`) to the relevant rule below, then
# run `sops updatekeys archive/secrets-sops-backup/<name>.yaml` to re-encrypt.
#
# To revoke: remove the recipient from the relevant rule and run
# `sops updatekeys` (this is what `homelab client remove` calls). Past
# ciphertext the client already decrypted is not affected — rotate the
# underlying credential if compromise is suspected.

creation_rules:
  - path_regex: ^archive/secrets-sops-backup/hello\.yaml$
    # The "hello" secret is encrypted to every enrolled client so the bootstrap
    # decrypt test works for everyone. Add each new client's age_pubkey when
    # they enrol; re-key with `sops updatekeys -y secrets/hello.yaml`.
    age: >-
      age1xkklkvnk5z0fsnh6cfgv70hy9ksfy8rdprwerzw4yk3p4p7cxcqs2yvpz6,
      age1duyl8mkpgu80uv934dy8q7enqjms6yvdz264hme8uryuxmvvqesq6rusq0,
      age1vf8h7s8mqsn2q5eadgpdupsj4mwn8zguc77d85ws3xj40sl9rgksx2rxw6,
      age1z62ff2ak9zj5ctcvaxwyyhedwjvlwgm2dkn9nk3wrwk8fkavcpmsqwc2vs,
      age1s07zs83ehtlg8jtwvr75ltc3c4cdlemfwjuxrwjtwkqxkl9tpggsyrzn2h,
      age1rtwvdct6avjkr3cyxv3vue3vqx4d524fjfr3vk7xrnvyrylnry5sm54sn4,
      age1pwtdws2thdh7vzp2dzttl3zxgcs2tgpcsjsqgw3q04nyml4kvuqq467u4x

  - path_regex: archive/secrets-sops-backupgitea-pat\.yaml$
    # Write-scoped Gitea PAT (dtoro user). Same recipient list as hello.yaml
    # since every enrolled client should be able to push (homelab client
    # add/remove, wiki edits, etc.).
    age: >-
      age1xkklkvnk5z0fsnh6cfgv70hy9ksfy8rdprwerzw4yk3p4p7cxcqs2yvpz6,
      age1duyl8mkpgu80uv934dy8q7enqjms6yvdz264hme8uryuxmvvqesq6rusq0,
      age1vf8h7s8mqsn2q5eadgpdupsj4mwn8zguc77d85ws3xj40sl9rgksx2rxw6,
      age1z62ff2ak9zj5ctcvaxwyyhedwjvlwgm2dkn9nk3wrwk8fkavcpmsqwc2vs,
      age1s07zs83ehtlg8jtwvr75ltc3c4cdlemfwjuxrwjtwkqxkl9tpggsyrzn2h,
      age1rtwvdct6avjkr3cyxv3vue3vqx4d524fjfr3vk7xrnvyrylnry5sm54sn4,
      age1pwtdws2thdh7vzp2dzttl3zxgcs2tgpcsjsqgw3q04nyml4kvuqq467u4x

  - path_regex: archive/secrets-sops-backupgitea-tokens\.yaml$
    # Workstations only.
    age: >-
      # placeholder — fill with age_pubkey of: republic-laptop, mac-mini, strong, hubris

  - path_regex: archive/secrets-sops-backupwebhook-hmacs\.yaml$
    # LXCs that run a webhook receiver.
    age: >-
      # placeholder — fill with age_pubkey of: apps, caddy

  - path_regex: archive/secrets-sops-backupturn-shared-secret\.yaml$
    # coturn TURN long-term-credential password. Consumed by hubris (which
    # renders /etc/turnserver.conf + /opt/management.json on the VPS via
    # `homelab render-vps-configs`). Other recipients are convenience for
    # operator debugging — only hubris's pubkey is strictly required.
    age: >-
      age1xkklkvnk5z0fsnh6cfgv70hy9ksfy8rdprwerzw4yk3p4p7cxcqs2yvpz6,
      age1duyl8mkpgu80uv934dy8q7enqjms6yvdz264hme8uryuxmvvqesq6rusq0,
      age1vf8h7s8mqsn2q5eadgpdupsj4mwn8zguc77d85ws3xj40sl9rgksx2rxw6,
      age1z62ff2ak9zj5ctcvaxwyyhedwjvlwgm2dkn9nk3wrwk8fkavcpmsqwc2vs,
      age1s07zs83ehtlg8jtwvr75ltc3c4cdlemfwjuxrwjtwkqxkl9tpggsyrzn2h,
      age1pwtdws2thdh7vzp2dzttl3zxgcs2tgpcsjsqgw3q04nyml4kvuqq467u4x

  - path_regex: archive/secrets-sops-backupnetbird-authentik-oidc\.yaml$
    # Authentik OIDC client secret for the netbird-dashboard provider.
    # Consumed by hubris to render /opt/management.json on the VPS
    # (PKCEAuthorizationFlow.ProviderConfig.ClientSecret).
    age: >-
      age1xkklkvnk5z0fsnh6cfgv70hy9ksfy8rdprwerzw4yk3p4p7cxcqs2yvpz6,
      age1duyl8mkpgu80uv934dy8q7enqjms6yvdz264hme8uryuxmvvqesq6rusq0,
      age1vf8h7s8mqsn2q5eadgpdupsj4mwn8zguc77d85ws3xj40sl9rgksx2rxw6,
      age1z62ff2ak9zj5ctcvaxwyyhedwjvlwgm2dkn9nk3wrwk8fkavcpmsqwc2vs,
      age1s07zs83ehtlg8jtwvr75ltc3c4cdlemfwjuxrwjtwkqxkl9tpggsyrzn2h,
      age1pwtdws2thdh7vzp2dzttl3zxgcs2tgpcsjsqgw3q04nyml4kvuqq467u4x

  - path_regex: archive/secrets-sops-backupnetbird-pat\.yaml$
    # NetBird API Personal Access Token. Consumed by the dns-sync job on the
    # `dns` LXC (107) to reconcile Technitium -> NetBird managed DNS zone.
    # (When 107 is enrolled, add its age_pubkey here and updatekeys.)
    age: >-
      age1xkklkvnk5z0fsnh6cfgv70hy9ksfy8rdprwerzw4yk3p4p7cxcqs2yvpz6,
      age1duyl8mkpgu80uv934dy8q7enqjms6yvdz264hme8uryuxmvvqesq6rusq0,
      age1vf8h7s8mqsn2q5eadgpdupsj4mwn8zguc77d85ws3xj40sl9rgksx2rxw6,
      age1z62ff2ak9zj5ctcvaxwyyhedwjvlwgm2dkn9nk3wrwk8fkavcpmsqwc2vs

  - path_regex: archive/secrets-sops-backupopenrouter-api-key\.yaml$
    # OpenRouter API key consumed by the `nomos` wrapper (bin/nomos) when
    # spawning a Goose session. Recipients are any host that should run a
    # Nomos agent. Add a host's age_pubkey here, then
    # `sops updatekeys -y secrets/openrouter-api-key.yaml`.
    # See operations/nomos-agent.md.
    age: >-
      age1xkklkvnk5z0fsnh6cfgv70hy9ksfy8rdprwerzw4yk3p4p7cxcqs2yvpz6,
      age1vf8h7s8mqsn2q5eadgpdupsj4mwn8zguc77d85ws3xj40sl9rgksx2rxw6,
      age1z62ff2ak9zj5ctcvaxwyyhedwjvlwgm2dkn9nk3wrwk8fkavcpmsqwc2vs,
      age1s07zs83ehtlg8jtwvr75ltc3c4cdlemfwjuxrwjtwkqxkl9tpggsyrzn2h

  - path_regex: archive/secrets-sops-backupyuvomi-api-token\.yaml$
    # Named Bearer token for the Yuvomi REST API, consumed by yuvomi-mcp on
    # LXC 129 (house).
    age: >-
      age1xkklkvnk5z0fsnh6cfgv70hy9ksfy8rdprwerzw4yk3p4p7cxcqs2yvpz6,
      age1vf8h7s8mqsn2q5eadgpdupsj4mwn8zguc77d85ws3xj40sl9rgksx2rxw6,
      age1z62ff2ak9zj5ctcvaxwyyhedwjvlwgm2dkn9nk3wrwk8fkavcpmsqwc2vs,
      age1s07zs83ehtlg8jtwvr75ltc3c4cdlemfwjuxrwjtwkqxkl9tpggsyrzn2h

  - path_regex: archive/secrets-sops-backuphermes-house-users\.yaml$
    # Signal number → Yuvomi user_id mapping (PII). Consumed by hermesd on LXC 129.
    age: >-
      age1xkklkvnk5z0fsnh6cfgv70hy9ksfy8rdprwerzw4yk3p4p7cxcqs2yvpz6,
      age1vf8h7s8mqsn2q5eadgpdupsj4mwn8zguc77d85ws3xj40sl9rgksx2rxw6,
      age1z62ff2ak9zj5ctcvaxwyyhedwjvlwgm2dkn9nk3wrwk8fkavcpmsqwc2vs,
      age1s07zs83ehtlg8jtwvr75ltc3c4cdlemfwjuxrwjtwkqxkl9tpggsyrzn2h

  - path_regex: archive/secrets-sops-backupoikos-approval-hmac\.yaml$
    # HMAC signing key for Oikos approval-grant tokens (oikos/approve.py).
    # Recipients: apps (105, runs the approval engine alongside homelab-mcp)
    # and hubris (admin/debug decrypt). See OIKOS.md "Approval engine".
    age: >-
      age1xkklkvnk5z0fsnh6cfgv70hy9ksfy8rdprwerzw4yk3p4p7cxcqs2yvpz6,
      age1duyl8mkpgu80uv934dy8q7enqjms6yvdz264hme8uryuxmvvqesq6rusq0

  - path_regex: archive/secrets-sops-backupoikos-console-deploy-secret\.yaml$
    # Shared HMAC secret for the Gitea deploy webhook (id 14) ->
    # oikos-console-deploy.service on apps (105). Generated + registered
    # with Gitea before the apps-side install ran (see
    # oikos/console/deploy/README.md "Status") — write this exact value
    # into /etc/oikos-console-deploy/secret rather than letting
    # webhook/install.sh generate a fresh one.
    age: >-
      age1duyl8mkpgu80uv934dy8q7enqjms6yvdz264hme8uryuxmvvqesq6rusq0
# webhook noop 2026-05-20T18:16:57+02:00
