Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
ssh-store.hh
Go to the documentation of this file.
1#pragma once
3
8
9namespace nix {
10
11struct SSHStoreConfig : std::enable_shared_from_this<SSHStoreConfig>,
12 virtual RemoteStoreConfig,
13 virtual CommonSSHStoreConfig
14{
15private:
16 void anchor() override;
17
18public:
19 SSHStoreConfig(const Params & params)
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
48struct MountedSSHStoreConfig : virtual SSHStoreConfig, virtual LocalFSStoreConfig
49{
50private:
51 void anchor() override;
52
53public:
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
Definition configuration.hh:476
Definition ref.hh:58
ParsedURL::Authority authority
Definition common-ssh-store-config.hh:45
ref< Store > openStore() const override
Definition ssh-store.cc:219
Definition url.hh:32
ref< Store > openStore() const override
Definition ssh-store.cc:214
StoreReference getReference() const override
Definition ssh-store.cc:31
@ Unix
Definition store-api.hh:131
Definition store-api.hh:240
std::map< std::string, std::string, std::less<> > StringMap
Definition types.hh:26
std::set< std::string, std::less<> > StringSet
Definition types.hh:45