Merge pull request #235 from MagicRB/catch-silent-disable-of-cachix

Add check, which catchis silent disabling of cachix
This commit is contained in:
Jörg Thalheim 2024-07-26 13:05:23 +02:00 committed by GitHub
commit c9b6d013d7
Failed to generate hash of commit

View file

@ -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";