From 36ef50e49f44c0dcdde04e3267242ca9d7adec9b Mon Sep 17 00:00:00 2001 From: magic_rb Date: Fri, 26 Jul 2024 12:17:56 +0200 Subject: [PATCH] Add check, which catchis silent disabling of cachix Signed-off-by: magic_rb --- nix/master.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/nix/master.nix b/nix/master.nix index 43c3161..d7b861a 100644 --- a/nix/master.nix +++ b/nix/master.nix @@ -1,6 +1,7 @@ { config , pkgs , lib +, options , ... }: let @@ -352,6 +353,23 @@ in }; assertions = [ + { + assertion = + let + optionsCachix = options.services.buildbot-nix.master.cachix; + allIsNull = lib.all (x: x == null); + in + optionsCachix.enable.value || lib.foldr (a: b: a && b) true [ + (optionsCachix.name.isDefined -> allIsNull optionsCachix.name.definitions) + (optionsCachix.signingKeyFile.isDefined -> allIsNull optionsCachix.signingKeyFile.definitions) + (optionsCachix.authTokenFile.isDefined -> allIsNull optionsCachix.authTokenFile.definitions) + ]; + message = '' + The semantics of `options.services.buildbot-nix.master.cachix` recently changed slightly, the options + `name`, `signingKeyFile`, and `authTokenFile` are no longer null-able. To enable Cachix support use: + `options.services.buildbot-nix.master.cachix.enable = True`. + ''; + } { assertion = lib.versionAtLeast cfg.buildbotNixpkgs.buildbot.version "4.0.0";