Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
ssh-store.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
nix/store/common-ssh-store-config.hh
"
5
#include "
nix/store/store-api.hh
"
6
#include "
nix/store/local-fs-store.hh
"
7
#include "
nix/store/remote-store.hh
"
8
9
namespace
nix {
10
11
struct
SSHStoreConfig : std::enable_shared_from_this<SSHStoreConfig>,
12
virtual
RemoteStoreConfig,
13
virtual
CommonSSHStoreConfig
14
{
15
private
:
16
void
anchor()
override
;
17
18
public
:
19
SSHStoreConfig(
const
Params & params)
20
:
StoreConfig
(params,
FilePathType::Unix
)
21
, RemoteStoreConfig(params,
FilePathType::Unix
)
22
, CommonSSHStoreConfig(params)
23
{
24
}
25
26
SSHStoreConfig(
const
ParsedURL::Authority
&
authority
,
const
Params & params);
27
28
Setting<Strings>
remoteProgram{
29
this
, {
"nix-daemon"
},
"remote-program"
,
"Path to the `nix-daemon` executable on the remote machine."
};
30
31
static
const
std::string name()
32
{
33
return
"Experimental SSH Store"
;
34
}
35
36
static
StringSet
uriSchemes()
37
{
38
return
{
"ssh-ng"
};
39
}
40
41
static
std::string doc();
42
43
ref<Store>
openStore
()
const override
;
44
45
StoreReference
getReference
()
const override
;
46
};
47
48
struct
MountedSSHStoreConfig :
virtual
SSHStoreConfig,
virtual
LocalFSStoreConfig
49
{
50
private
:
51
void
anchor()
override
;
52
53
public
:
54
MountedSSHStoreConfig(
StringMap
params);
55
MountedSSHStoreConfig(
const
ParsedURL::Authority
&
authority
,
StringMap
params);
56
57
static
const
std::string name()
58
{
59
return
"Experimental SSH Store with filesystem mounted"
;
60
}
61
62
static
StringSet
uriSchemes()
63
{
64
return
{
"mounted-ssh-ng"
};
65
}
66
67
static
std::string doc();
68
69
static
std::optional<ExperimentalFeature> experimentalFeature()
70
{
71
return
ExperimentalFeature::MountedSSHStore;
72
}
73
74
ref<Store>
openStore
()
const override
;
75
};
76
77
}
// namespace nix
nix::Setting
Definition
configuration.hh:476
nix::ref
Definition
ref.hh:58
common-ssh-store-config.hh
local-fs-store.hh
remote-store.hh
store-api.hh
nix::CommonSSHStoreConfig::authority
ParsedURL::Authority authority
Definition
common-ssh-store-config.hh:45
nix::MountedSSHStoreConfig::openStore
ref< Store > openStore() const override
Definition
ssh-store.cc:219
nix::ParsedURL::Authority
Definition
url.hh:32
nix::SSHStoreConfig::openStore
ref< Store > openStore() const override
Definition
ssh-store.cc:214
nix::SSHStoreConfig::getReference
StoreReference getReference() const override
Definition
ssh-store.cc:31
nix::StoreConfigBase::FilePathType::Unix
@ Unix
Definition
store-api.hh:131
nix::StoreConfig
Definition
store-api.hh:240
nix::StringMap
std::map< std::string, std::string, std::less<> > StringMap
Definition
types.hh:26
nix::StringSet
std::set< std::string, std::less<> > StringSet
Definition
types.hh:45
libstore
include
nix
store
ssh-store.hh
Generated by
1.18.0