summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-01 05:45:23 +0000
committertv <tv@krebsco.de>2026-12-01 05:45:23 +0000
commit1627cff1b7feef7768dfc227882e5e4ba1f6aed2 (patch)
tree0e14093caa35d47a916c20a49614f6172f140b6c
parent65ed8349321d6c718e57ceff429434ca46f1567d (diff)
krops.nix: declare the location secrets for enstate
-rw-r--r--krops.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/krops.nix b/krops.nix
index 62ca1cc4..eeb6fb06 100644
--- a/krops.nix
+++ b/krops.nix
@@ -181,6 +181,8 @@ rec {
run = "/run/enstate/krops";
pending = "${run}/pending";
stateDir = "/var/lib/enstate";
+ # Sources the host's slots name by location.
+ locations.secrets.source.command = [ "secrets" name "$(var:key)" ];
in {
# By channel name, so the same state packs the same.
packAndCopy = pkgs.populate {
@@ -191,7 +193,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} \
+ --pack ${pkgs.writers.writeJSON "${name}-enstate-${channel}.json" (sourceList // { inherit locations; })} \
--out "$1"/${channel}
'') sourceLists)}
'');
[cgit] Unable to lock slot /tmp/cgit/46100000.lock: Permission denied (13)