summaryrefslogtreecommitdiffstats
path: root/krops.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-02 18:16:38 +0000
committertv <tv@krebsco.de>2026-12-02 18:16:38 +0000
commit1b511421ff490ea7cf4831dfada5eca248da2cc4 (patch)
treee835216796c41f413956b55270af22eb7e9278c3 /krops.nix
parent819523723a7fba80957e4bc9326d5a8f4926fa21 (diff)
enstate: named importers instead of locations
enstate a5175d9 replaces locations by named importers, and refuses the old form. A slot names its source as { secrets.key = …; }, and krops.nix puts its importer secrets into each source list's meta.importer, merged with the host's own enstate.importers.
Diffstat (limited to 'krops.nix')
-rw-r--r--krops.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/krops.nix b/krops.nix
index 7223d8f7..64dd50a2 100644
--- a/krops.nix
+++ b/krops.nix
@@ -184,8 +184,8 @@ rec {
run = "${hostConfig.enstate.providersDir}/krops";
pending = "${run}/pending";
stateDir = "/var/lib/enstate";
- # Sources the host's slots name by location.
- locations.secrets.source.command = [ "secrets" name "$(var:key)" ];
+ # Named importers the host's slots use.
+ importers.secrets.command = [ "secrets" name "$(var:key)" ];
in {
# By channel name, so the same state packs the same.
packAndCopy = pkgs.populate {
@@ -196,7 +196,7 @@ rec {
set -efu
${lib.concatStrings (lib.mapAttrsToList (channel: sourceList: /* sh */ ''
${local.pkgs.enstate}/bin/enstate \
- --pack ${pkgs.writers.writeJSON "${name}-enstate-${channel}.json" (sourceList // { inherit locations; })} \
+ --pack ${pkgs.writers.writeJSON "${name}-enstate-${channel}.json" (lib.recursiveUpdate sourceList { meta.importer = importers; })} \
--out "$1"/${channel}
'') sourceLists)}
'');