nixos/nix-daemon.nix: assert distributedBuilds and buildMachines!=[]

Without distributedBuilds, you can’t use buildMachines flag.

Fixes #56593
This commit is contained in:
Matthew Bauer 2020-07-06 01:48:19 -04:00
parent 4855aa62fa
commit 250885d0ca

View File

@ -439,6 +439,13 @@ in
config = {
assertions = [
{
assertion = (!config.nix.distributedBuilds) && config.nix.buildMachines != [];
message = "You must set `nix.distributedBuilds = true` to use nix.buildMachines";
}
];
nix.binaryCachePublicKeys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
nix.binaryCaches = [ "https://cache.nixos.org/" ];