Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
machines.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
nix/util/ref.hh
"
5
#include "
nix/store/store-reference.hh
"
6
7
namespace
nix {
8
9
class
Store
;
10
11
struct
Machine
;
12
13
typedef
std::vector<Machine> Machines;
14
15
struct
Machine
16
{
17
18
const
StoreReference storeUri;
26
const
StringSet
systemTypes
;
27
const
std::optional<std::filesystem::path> sshKey;
28
const
unsigned
int
maxJobs;
29
const
float
speedFactor;
30
const
StringSet
supportedFeatures;
31
const
StringSet
mandatoryFeatures;
32
const
std::string sshPublicHostKey;
33
bool
enabled =
true
;
34
39
bool
systemSupported
(
const
std::string & system)
const
;
40
45
bool
allSupported
(
const
StringSet
& features)
const
;
46
50
bool
mandatoryMet
(
const
StringSet
& features)
const
;
51
52
Machine(
53
const
std::string & storeUri,
54
decltype
(
systemTypes
)
systemTypes
,
55
decltype
(sshKey) sshKey,
56
decltype
(maxJobs) maxJobs,
57
decltype
(speedFactor) speedFactor,
58
decltype
(supportedFeatures) supportedFeatures,
59
decltype
(mandatoryFeatures) mandatoryFeatures,
60
decltype
(sshPublicHostKey) sshPublicHostKey);
61
67
StoreReference
completeStoreReference
()
const
;
68
77
ref<Store>
openStore
()
const
;
78
86
static
Machines
parseConfig
(
const
StringSet
& defaultSystems,
const
std::string & config);
87
};
88
89
}
// namespace nix
nix::Store
Definition
store-api.hh:397
nix::ref
Definition
ref.hh:58
ref.hh
store-reference.hh
nix::Machine
Definition
machines.hh:16
nix::Machine::allSupported
bool allSupported(const StringSet &features) const
Definition
machines.cc:47
nix::Machine::systemTypes
const StringSet systemTypes
Definition
machines.hh:26
nix::Machine::mandatoryMet
bool mandatoryMet(const StringSet &features) const
Definition
machines.cc:54
nix::Machine::completeStoreReference
StoreReference completeStoreReference() const
Definition
machines.cc:61
nix::Machine::openStore
ref< Store > openStore() const
Definition
machines.cc:95
nix::Machine::systemSupported
bool systemSupported(const std::string &system) const
Definition
machines.cc:42
nix::Machine::parseConfig
static Machines parseConfig(const StringSet &defaultSystems, const std::string &config)
Definition
machines.cc:205
nix::StringSet
std::set< std::string, std::less<> > StringSet
Definition
types.hh:45
libstore
include
nix
store
machines.hh
Generated by
1.18.0