1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 04:56:01 +01:00

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.
This commit is contained in:
Graham Christensen 2021-02-24 20:52:22 -05:00
parent 8803753666
commit 5a2716f6d3
No known key found for this signature in database
GPG key ID: FE918C3A98C1030F
5 changed files with 22 additions and 4 deletions

View file

@ -15,6 +15,7 @@ class SSHStore : public RemoteStore
public:
const Setting<Path> sshKey{(Store*) this, "", "ssh-key", "path to an SSH private key"};
const Setting<std::string> sshPublicHostKey{(Store*) this, "", "base64-ssh-public-host-key", "The public half of the host's SSH key"};
const Setting<bool> compress{(Store*) this, false, "compress", "whether to compress the connection"};
SSHStore(const std::string & host, const Params & params)
@ -24,6 +25,7 @@ public:
, master(
host,
sshKey,
sshPublicHostKey,
// Use SSH master only if using more than 1 connection.
connections->capacity() > 1,
compress)