aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/machines.cc
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2021-02-24 20:52:22 -0500
committerGraham Christensen <graham@grahamc.com>2021-02-25 09:17:34 -0500
commit1130b2882415b003f5ba2fc0b5466b573fe1b05a (patch)
treeee523e721a944277ce3e6fa6a95c61c3c2efeb10 /src/libstore/machines.cc
parent199081ad00e6ee4c704eaac34211b454fe0f310c (diff)
distributed builds: load remote builder host key from the machines file
This is already used by Hydra, and is very useful when materializing a remote builder list from service discovery. This allows the service discovery tool to only sync one file instead of two.
Diffstat (limited to 'src/libstore/machines.cc')
-rw-r--r--src/libstore/machines.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/machines.cc b/src/libstore/machines.cc
index 7db2556f4..b42e5e434 100644
--- a/src/libstore/machines.cc
+++ b/src/libstore/machines.cc
@@ -54,9 +54,15 @@ ref<Store> Machine::openStore() const {
if (hasPrefix(storeUri, "ssh://")) {
storeParams["max-connections"] = "1";
storeParams["log-fd"] = "4";
+ }
+
+ if (hasPrefix(storeUri, "ssh://") || hasPrefix(storeUri, "ssh-ng://")) {
if (sshKey != "")
storeParams["ssh-key"] = sshKey;
+ if (sshPublicHostKey != "")
+ storeParams["base64-ssh-public-host-key"] = sshPublicHostKey;
}
+
{
auto & fs = storeParams["system-features"];
auto append = [&](auto feats) {