Skip to content

Commit df6b45b

Browse files
committed
nix: enable buildbot badges
Just enough config to make this easily extensible in the future.
1 parent 6552835 commit df6b45b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

nix/master.nix

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
}:
66
let
77
cfg = config.services.buildbot-nix.master;
8+
9+
# The start of a mergeable settings infrastructure.
10+
www_config = {
11+
plugins = {
12+
# https://docs.buildbot.net/current/manual/configuration/www.html#badges
13+
badges = { };
14+
};
15+
};
816
in
917
{
1018
options = {
@@ -145,6 +153,7 @@ in
145153
extraImports = ''
146154
from datetime import timedelta
147155
from buildbot_nix import GithubConfig, NixConfigurator, CachixConfig
156+
import json
148157
'';
149158
configurators = [
150159
''
@@ -183,9 +192,19 @@ in
183192
ps.treq
184193
ps.psycopg2
185194
(ps.toPythonModule pkgs.buildbot-worker)
195+
pkgs.buildbot-plugins.badges
186196
pkgs.buildbot-plugins.www-react
187197
(pkgs.python3.pkgs.callPackage ../default.nix { })
188198
];
199+
200+
extraConfig = ''
201+
# WOOT
202+
c['www'] = json.loads(
203+
''''
204+
${builtins.toJSON www_config}
205+
''''
206+
)
207+
'';
189208
};
190209

191210
systemd.services.buildbot-master = {

0 commit comments

Comments
 (0)