From f1e021e303e7edba7638fd412459e07f1007c908 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Fri, 27 Nov 2026 00:35:42 +0000 Subject: [PATCH] flake: Name secret recipients for slop-broker Approvals list host keys abbreviated, which says little about which box a secret goes to. Add a `secretRecipients` output naming each system's `my.secrets.key` and the `ageKeyFiles` keys, for the broker to evaluate on `master` (slop-broker `secrets.names_attr`). Co-Authored-By: Claude Opus 5.5 --- docs/slop-broker.md | 3 +++ flake.nix | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/docs/slop-broker.md b/docs/slop-broker.md index 3ddd343..8425fef 100644 --- a/docs/slop-broker.md +++ b/docs/slop-broker.md @@ -81,6 +81,9 @@ collects garbage in that store on every run, which the roots survive until they [design](https://git.nul.ie/dev/slop-broker/src/branch/main/docs/design.md#secrets)). - `secrets.names` labels `dev` and `slop-broker` in approvals (`lib.my.c.ageKeyFiles`); host keys are shown abbreviated. +- The `secretRecipients` flake output names every key: each system's `my.secrets.key` by the + system's name, and the `lib.my.c.ageKeyFiles` keys. Once the broker supports + `secrets.namesAttr`, it evaluates this on `master` instead of `secrets.names`. ### `master` is protected diff --git a/flake.nix b/flake.nix index 39c16b2..97171e8 100644 --- a/flake.nix +++ b/flake.nix @@ -259,6 +259,11 @@ homeConfigurations = mapAttrs (_: s: s.configuration) nixfiles.config.home-manager.homes; deploy = nixfiles.config.deploy-rs.rendered; + + # Names for secret recipients' keys, which `slop-broker` shows in approvals + secretRecipients = + filterAttrs (_: key: key != null) (mapAttrs (_: c: c.config.my.secrets.key) self.nixosConfigurations) + // mapAttrs (_: lib.fileContents) lib.my.c.ageKeyFiles; } // (eachDefaultSystem (system: let