From c2a0025f7ad3e13f00a374e33b54b2541eeb9c79 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 9 Jan 2018 22:34:28 +0100 Subject: [PATCH] nix: add warning for distributed builds --- modules/nix/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 84ee791..4679d82 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -308,8 +308,10 @@ in config = { - warnings = mkIf (!config.services.activate-system.enable && cfg.distributedBuilds) - [ "services.activate-system is not enabled, a reboot could cause distributed builds to stop working." ]; + warnings = [ + (mkIf (!config.services.activate-system.enable && cfg.distributedBuilds) "services.activate-system is not enabled, a reboot could cause distributed builds to stop working.") + (mkIf (!cfg.distributedBuilds && cfg.buildMachines != []) "nix.distributedBuilds is not enabled, build machines won't be configured.") + ]; nix.binaryCaches = mkAfter [ https://cache.nixos.org/ ]; nix.binaryCachePublicKeys = mkAfter [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];