From 1b511421ff490ea7cf4831dfada5eca248da2cc4 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Dec 2026 18:16:38 +0000 Subject: enstate: named importers instead of locations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- configs/retiolum.nix | 5 +---- krops.nix | 6 +++--- sources.json | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/configs/retiolum.nix b/configs/retiolum.nix index 98fa38d9..b634d9c9 100644 --- a/configs/retiolum.nix +++ b/configs/retiolum.nix @@ -71,10 +71,7 @@ in { enstate.channels.secrets.slots."retiolum.key" = { type = keyType; secret = true; - source = lib.mkDefault { - location = "secrets"; - key = "retiolum.ed25519_key.priv"; - }; + source = lib.mkDefault { secrets.key = "retiolum.ed25519_key.priv"; }; }; }) (lib.mkIf (!config.hrm.nftables.enable) { 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)} ''); diff --git a/sources.json b/sources.json index f2b0ce1c..2c13d686 100644 --- a/sources.json +++ b/sources.json @@ -7,8 +7,8 @@ }, "enstate": { "branch": "master", - "date": "2026-12-02T16:08:25Z", - "rev": "c12a111d523395c34da0a82695d29f74597a62a5", + "date": "2026-12-02T18:02:17Z", + "rev": "a5175d95f72e282a415b648b507dd05d112392db", "url": "https://cgit.krebsco.de/enstate" }, "mobile-nixos": { -- cgit v1.3.1