Skip to content

Commit

Permalink
nixos/nix-daemon.nix: fix nix.distributedBuilds assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewbauer committed Jul 31, 2020
1 parent ed1423b commit 67b6e56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/services/misc/nix-daemon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ in

assertions = [
{
assertion = (!config.nix.distributedBuilds) && config.nix.buildMachines != [];
assertion = config.nix.distributedBuilds || config.nix.buildMachines == [];
message = "You must set `nix.distributedBuilds = true` to use nix.buildMachines";
}
];
Expand Down

3 comments on commit 67b6e56

@kloenk
Copy link
Member

@kloenk kloenk commented on 67b6e56 Aug 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just hit an eval error whit this fix. I purposely set distributedBuilds to false and set buildMachines, to use the build machines with hydra. As far as I understood I have to have localhost as an buildMachine for hydra to use it. Should this be changed to a warning to avoid possible recursions in buildMachines with hydra?

@kloenk
Copy link
Member

@kloenk kloenk commented on 67b6e56 Aug 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also would see it as a feature If we can write the /etc/nix/machines file, but only load it with a command line flag while calling nix.

CC @matthewbauer

@matthewbauer
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - this is more annoying than helpful in that case. Let's revert it for now since distributedBuilds can be useful in that way; fc726e3

Please sign in to comment.