Add check, which catchis silent disabling of cachix

Signed-off-by: magic_rb <richard@brezak.sk>
This commit is contained in:
magic_rb 2024-07-26 12:17:56 +02:00
parent 7480ee03b3
commit 36ef50e49f
Failed to generate hash of commit

View file

@ -1,6 +1,7 @@
{ config { config
, pkgs , pkgs
, lib , lib
, options
, ... , ...
}: }:
let let
@ -352,6 +353,23 @@ in
}; };
assertions = [ 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 = assertion =
lib.versionAtLeast cfg.buildbotNixpkgs.buildbot.version "4.0.0"; lib.versionAtLeast cfg.buildbotNixpkgs.buildbot.version "4.0.0";