forked from mirrors/nixpkgs
Remove nix.manualNixMachines
Suggested by Marc Weber. Fixes #1059. Generate /etc/nix.machines only if buildMachines is not empty. Thus, if you want to manage /etc/nix.machines in some other way, you can set nix.distributedBuilds to true but not set nix.buildMachines.
This commit is contained in:
parent
7c7bfa817a
commit
16cd8b039b
|
@ -108,24 +108,10 @@ in
|
||||||
|
|
||||||
distributedBuilds = mkOption {
|
distributedBuilds = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
description = "
|
description = ''
|
||||||
Whether to distribute builds to the machines listed in
|
Whether to distribute builds to the machines listed in
|
||||||
<option>nix.buildMachines</option>.
|
<option>nix.buildMachines</option>.
|
||||||
If you know that the <option>buildMachines</option> are not
|
'';
|
||||||
always available either use nixos
|
|
||||||
<command>nixos-rebuild --no-build-hook</command>
|
|
||||||
or consider managing <filename>/etc/nix.machines</filename> manually
|
|
||||||
by setting <option>manualNixMachines</option>. Then you can comment
|
|
||||||
unavailable build machines.
|
|
||||||
";
|
|
||||||
};
|
|
||||||
|
|
||||||
manualNixMachines = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "
|
|
||||||
Whether to manually manage the list of build machines used in distributed
|
|
||||||
builds in /etc/nix.machines.
|
|
||||||
";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
daemonNiceLevel = mkOption {
|
daemonNiceLevel = mkOption {
|
||||||
|
@ -145,6 +131,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
buildMachines = mkOption {
|
buildMachines = mkOption {
|
||||||
|
default = [];
|
||||||
example = [
|
example = [
|
||||||
{ hostName = "voila.labs.cs.uu.nl";
|
{ hostName = "voila.labs.cs.uu.nl";
|
||||||
sshUser = "nix";
|
sshUser = "nix";
|
||||||
|
@ -161,7 +148,7 @@ in
|
||||||
mandatoryFeatures = "perf";
|
mandatoryFeatures = "perf";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
description = "
|
description = ''
|
||||||
This option lists the machines to be used if distributed
|
This option lists the machines to be used if distributed
|
||||||
builds are enabled (see
|
builds are enabled (see
|
||||||
<option>nix.distributedBuilds</option>). Nix will perform
|
<option>nix.distributedBuilds</option>). Nix will perform
|
||||||
|
@ -185,7 +172,7 @@ in
|
||||||
key should be added to
|
key should be added to
|
||||||
<filename>~<replaceable>sshUser</replaceable>/authorized_keys</filename>
|
<filename>~<replaceable>sshUser</replaceable>/authorized_keys</filename>
|
||||||
on the remote machine.
|
on the remote machine.
|
||||||
";
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
proxy = mkOption {
|
proxy = mkOption {
|
||||||
|
@ -263,7 +250,7 @@ in
|
||||||
# List of machines for distributed Nix builds in the format
|
# List of machines for distributed Nix builds in the format
|
||||||
# expected by build-remote.pl.
|
# expected by build-remote.pl.
|
||||||
environment.etc."nix.machines" =
|
environment.etc."nix.machines" =
|
||||||
{ enable = cfg.distributedBuilds && !cfg.manualNixMachines;
|
{ enable = cfg.buildMachines != [];
|
||||||
text =
|
text =
|
||||||
concatMapStrings (machine:
|
concatMapStrings (machine:
|
||||||
"${machine.sshUser}@${machine.hostName} "
|
"${machine.sshUser}@${machine.hostName} "
|
||||||
|
|
Loading…
Reference in a new issue