feat(secrets): Base names on encrypted contents

This is useful, for example, to make systemd services restart without
fiddling with restart triggers. In sops we achieved this by setting the
attribute name using a function - this isn't possible with agenix-rekey
because it needs to evaluate secrets (including their attribute names)
when the files don't yet exist

Despite this, we can still set the "name" - which is used only when
rekeying and deploying the secret - and manually handle attribute names

Change-Id: Ia49c7fe9eb55341f433cbb7c49935584b48518fe
Reviewed-on: https://git.clicks.codes/c/Infra/NixFiles/+/806
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Skyler Grey <minion@clicks.codes>
15 files changed
tree: d7c8f3269bb92c52111f5de73dddb7318d703e58
  1. .reuse/
  2. .vscode/
  3. lib/
  4. LICENSES/
  5. modules/
  6. overlays/
  7. packages/
  8. secrets/
  9. shells/
  10. systems/
  11. .editorconfig
  12. .envrc
  13. .gitignore
  14. .gitreview
  15. .gitreview.license
  16. CONTRIBUTORS.md
  17. flake.lock
  18. flake.lock.license
  19. flake.nix
  20. README.md
README.md

Clicks - Infrastructure

This repository contains system configuration for Clicks's infrastructure.

Config

Config is written using Snowfall lib. It keeps us organized and has some nice features like namespaces.

Systems

Devices are named after colors, areas are named as a letter, with the matching phonetic alphabet word. Areas are generally managed by one member of Clicks, who has full access to all of the servers in that area. If you require help for a specific area you can email admin@clicks.codes and in the subject line include the area you want help for.

SystemDescriptionAddress
tealPrimary Hostteal.alpha.clicks.domains
a1d2Build Serverd2.a1.clicks.domains

Deploying

Deploys are done with deploy-rs, you'll need to be able to ssh into a machine with its hostname (either by a nifty .ssh/config rule or tailscale).

Once you've done that, you'll be able to deploy with

$ deploy .#MACHINE_NAME