This also adds documentation for it in distributed-builds.md as that's possibly the most common use-case for remote ssh stores Support for `std::optional<uint16_t>` in Setting is also added since setting a port is optional. The line `#include "lix/libutil/strings.hh"` fixes that templates instanciations in lix/libutil/config-impl.hh were using string utils without including the header (why are they even there btw) Change-Id: Id806c117c48cdf158d9d1cb1e639b0df31d9bf11
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#pragma once
|
|
///@file
|
|
|
|
#include "lix/libstore/store-api.hh"
|
|
#include <cstdint>
|
|
|
|
namespace nix {
|
|
|
|
struct CommonSSHStoreConfig : virtual StoreConfig
|
|
{
|
|
using StoreConfig::StoreConfig;
|
|
|
|
const Setting<std::optional<uint16_t>> port{this, std::nullopt, "port",
|
|
"Port that should be used instead of the default on the remote machine."};
|
|
|
|
const Setting<Path> sshKey{this, "", "ssh-key",
|
|
"Path to the SSH private key used to authenticate to the remote machine."};
|
|
|
|
const Setting<std::string> sshPublicHostKey{this, "", "base64-ssh-public-host-key",
|
|
"The public host key of the remote machine."};
|
|
|
|
const Setting<bool> compress{this, false, "compress",
|
|
"Whether to enable SSH compression."};
|
|
|
|
const Setting<std::string> remoteStore{this, "", "remote-store",
|
|
R"(
|
|
[Store URL](@docroot@/command-ref/new-cli/nix3-help-stores.md#store-url-format)
|
|
to be used on the remote machine. The default is `auto`
|
|
(i.e. use the Nix daemon or `/nix/store` directly).
|
|
)"};
|
|
};
|
|
|
|
void registerSSHStore();
|
|
|
|
}
|