mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
Allow setting ssh://
pipe size
Exposed for Hydra. We could make it fancier but with (a) new store settings (b) switch to `ssh-ng://` both in the works, it doesn't seem worth it.
This commit is contained in:
parent
0d25cc6541
commit
94a7c34b2f
2 changed files with 8 additions and 0 deletions
|
@ -70,6 +70,9 @@ ref<LegacySSHStore::Connection> LegacySSHStore::openConnection()
|
||||||
command.push_back(remoteStore.get());
|
command.push_back(remoteStore.get());
|
||||||
}
|
}
|
||||||
conn->sshConn = master.startCommand(std::move(command), std::list{extraSshArgs});
|
conn->sshConn = master.startCommand(std::move(command), std::list{extraSshArgs});
|
||||||
|
if (connPipeSize) {
|
||||||
|
conn->sshConn->trySetBufferSize(*connPipeSize);
|
||||||
|
}
|
||||||
conn->to = FdSink(conn->sshConn->in.get());
|
conn->to = FdSink(conn->sshConn->in.get());
|
||||||
conn->from = FdSource(conn->sshConn->out.get());
|
conn->from = FdSource(conn->sshConn->out.get());
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,11 @@ struct LegacySSHStoreConfig : virtual CommonSSHStoreConfig
|
||||||
*/
|
*/
|
||||||
Strings extraSshArgs = {};
|
Strings extraSshArgs = {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exposed for hydra
|
||||||
|
*/
|
||||||
|
std::optional<size_t> connPipeSize;
|
||||||
|
|
||||||
const std::string name() override { return "SSH Store"; }
|
const std::string name() override { return "SSH Store"; }
|
||||||
|
|
||||||
static std::set<std::string> uriSchemes() { return {"ssh"}; }
|
static std::set<std::string> uriSchemes() { return {"ssh"}; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue