aboutsummaryrefslogtreecommitdiffstats
path: root/docs/design.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/design.md')
-rw-r--r--docs/design.md16
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