diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 0fbc9cecb4dff..971ecdf48e18f 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -500,6 +500,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/" ];