2025-05-29 15:17:45 +01:00
|
|
|
{ lib, config, ... }:
|
|
|
|
let
|
|
|
|
inherit (lib)
|
|
|
|
mapAttrs
|
|
|
|
types
|
|
|
|
;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
perSystem = {
|
2025-07-08 14:46:19 +01:00
|
|
|
# per-system CI options
|
2025-05-29 15:17:45 +01:00
|
|
|
options.ci = {
|
|
|
|
buildbot = lib.mkOption {
|
2025-07-08 14:46:19 +01:00
|
|
|
type = types.lazyAttrsOf types.raw;
|
2025-05-29 15:17:45 +01:00
|
|
|
default = { };
|
|
|
|
description = ''
|
2025-07-08 14:46:19 +01:00
|
|
|
A set of tests for [buildbot] to run.
|
|
|
|
|
|
|
|
[buildbot]: https://buildbot.nix-community.org
|
2025-05-29 15:17:45 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2025-07-08 14:46:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
flake = {
|
|
|
|
# top-level CI option
|
|
|
|
#
|
|
|
|
# NOTE:
|
|
|
|
# This must be an actual option, NOT a set of options.
|
|
|
|
# Otherwise, flake partitions will not be lazy.
|
|
|
|
options.ci = lib.mkOption {
|
|
|
|
type = types.lazyAttrsOf (types.lazyAttrsOf types.raw);
|
|
|
|
default = { };
|
|
|
|
description = ''
|
|
|
|
Outputs related to CI.
|
|
|
|
|
|
|
|
Usually defined via the `perSystem.ci` options.
|
|
|
|
'';
|
|
|
|
};
|
2025-05-29 15:17:45 +01:00
|
|
|
|
2025-07-08 14:46:19 +01:00
|
|
|
# Transpose per-system definitions to the top-level
|
2025-05-29 15:17:45 +01:00
|
|
|
config.ci = {
|
|
|
|
buildbot = mapAttrs (_: sysCfg: sysCfg.ci.buildbot) config.allSystems;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|