diff options
| author | tv <tv@krebsco.de> | 2026-11-30 13:22:23 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-30 19:51:09 +0000 |
| commit | 25ff6d1e2dac04905cb345261ad085d5d40590f9 (patch) | |
| tree | 5ea3cbff3a23c790068aeb33c6d2671f4c6be514 | |
| parent | e1644b9d0f72e9bad824e75e3b294968b06a454e (diff) | |
docs: services read views; enstate doesn't configure them
The sketch of the NixOS side: services point at the views' paths, which
the module names, as they like (LoadCredential=, a configuration file);
whether they are restarted when a view changes is up to reactions, since
a configuration may restart them itself.
| -rw-r--r-- | docs/design.md | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/docs/design.md b/docs/design.md index ff39c3f..da94eb0 100644 --- a/docs/design.md +++ b/docs/design.md @@ -251,8 +251,7 @@ A sketch of the NixOS side, names not final: enstate.channels.secrets.slots."retiolum.key" = { type = "application/x-openssh-private-key; algorithm=ed25519"; secret = true; - credentialFor = [ "tincr-retiolum" ]; # LoadCredential= follows - reaction.restart = [ "tincr-retiolum" ]; + reactions.restart = [ "tincr-retiolum.service" ]; # unless it restarts itself }; enstate.channels.secrets.slots."retiolum.pub" = { @@ -272,12 +271,19 @@ enstate.views.ssh-known-hosts = { from = [ "fleet/hosts" ]; renderer = ./render-known-hosts; }; + +# The services read views where they are, as they like. +systemd.services.tincr-retiolum.serviceConfig.LoadCredential = + "retiolum.key:${config.enstate.channels.secrets.slots."retiolum.key".path}"; +programs.ssh.extraConfig = "GlobalKnownHostsFile ${config.enstate.views.ssh-known-hosts.path}/known_hosts"; ``` From the declarations the module generates the schema (a file in the -system), the units' credentials, and the receptor's setup. Static -configuration points at the views' stable paths (`GlobalKnownHostsFile -/run/…/ssh-known-hosts`); what is behind them changes. +system) and the receptor's setup. enstate doesn't configure the services +that read views: static configuration points at the views' stable paths, +which the module names (`path`); what is behind them changes. A service +whose `LoadCredential=` reads a view is ordered after the unit that puts +the views in place, without saying so. ### 5.4 Submissions |
