Skip to content

Commit 349ed8a

Browse files
committed
Add buildbot module using NixOS compat
Signed-off-by: magic_rb <magic_rb@redalder.org>
1 parent 1425d93 commit 349ed8a

File tree

6 files changed

+145
-9
lines changed

6 files changed

+145
-9
lines changed

flake.lock

Lines changed: 110 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
{
1010
inputs = {
1111
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-25.11";
12+
buildbot-nix.url = "github:nix-community/buildbot-nix";
1213
treefmt-nix.url = "github:numtide/treefmt-nix";
1314
};
1415

@@ -17,7 +18,8 @@
1718
nixpkgs,
1819
self,
1920
treefmt-nix,
20-
}:
21+
...
22+
}@inputs:
2123
let
2224
supportedSystems = [
2325
"x86_64-linux"
@@ -40,7 +42,10 @@
4042
inherit (nixpkgs) lib;
4143
in
4244
{
43-
nglib = import ./lib nixpkgs.lib;
45+
nglib = import ./lib {
46+
inherit (nixpkgs) lib;
47+
inherit inputs;
48+
};
4449
examples = import ./examples {
4550
inherit nixpkgs;
4651
inherit (self) nglib;

lib/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
lib:
1+
{ lib, inputs }:
22
lib.fix (
33
nglib:
44
let
@@ -120,6 +120,6 @@ lib.fix (
120120
getOptionFromPath
121121
;
122122

123-
makeSystem = import ./make-system.nix { inherit lib nglib overlay; };
123+
makeSystem = import ./make-system.nix { inherit nglib overlay inputs; };
124124
}
125125
)

lib/make-system.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
88

99
# These arguments are provided by the overarching NixNG repository and are not user confugurable.
10-
{ nglib, overlay, ... }:
10+
{
11+
nglib,
12+
overlay,
13+
inputs,
14+
}:
1115
# These arguments are user configurable
1216
{
1317
nixpkgs,
@@ -26,6 +30,7 @@ let
2630
inherit nglib;
2731
__enableExperimentalNixOSCompatibility =
2832
specialArgs.__enableExperimentalNixOSCompatibility or false;
33+
nixngInputs = inputs;
2934
};
3035

3136
modules =

modules/nixos/buildbot.nix

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{ lib, nglib, nixngInputs, ... }:
2+
let
3+
buildbotMasterModule =
4+
nixngInputs.nixpkgs + "/nixos/modules/services/continuous-integration/buildbot/master.nix";
5+
buildbotWorkerModule =
6+
nixngInputs.nixpkgs + "/nixos/modules/services/continuous-integration/buildbot/worker.nix";
7+
in
8+
{
9+
options.nixos = lib.mkOption {
10+
type = lib.types.submodule {
11+
imports = [
12+
buildbotMasterModule
13+
buildbotWorkerModule
14+
nixngInputs.buildbot-nix.nixosModules.buildbot-master
15+
nixngInputs.buildbot-nix.nixosModules.buildbot-worker
16+
];
17+
};
18+
};
19+
}

modules/nixos/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
{
99
imports = lib.optionals __enableExperimentalNixOSCompatibility ([
1010
./systemd.nix
11+
./buildbot.nix
1112
./nginx.nix
1213
./users.nix
1314
./postgresql.nix

0 commit comments

Comments
 (0)