buildbot-nix/examples/default.nix

52 lines
1.5 KiB
Nix
Raw Normal View History

2023-09-10 09:16:51 +00:00
{ nixpkgs, system, buildbot-nix, ... }:
let
# some example configuration to make it eval
2023-09-10 10:11:50 +00:00
dummy = { config, modulesPath, ... }: {
2023-09-10 09:16:51 +00:00
networking.hostName = "example-common";
system.stateVersion = config.system.nixos.version;
users.users.root.initialPassword = "fnord23";
boot.loader.grub.devices = lib.mkForce [ "/dev/sda" ];
fileSystems."/".device = lib.mkDefault "/dev/sda";
};
inherit (nixpkgs) lib;
inherit (lib) nixosSystem;
in
{
2023-09-10 10:11:50 +00:00
example-master = lib.makeOverridable nixosSystem {
2023-09-10 09:16:51 +00:00
inherit system;
modules = [
dummy
2023-09-10 10:11:50 +00:00
{
services.buildbot-nix.master = {
enable = true;
url = "https://buildbot.thalheim.io";
workersFile = "/home/mic92/buildbot-nix/workers.json";
github = {
tokenFile = "/home/mic92/git/buildbot-nix/github-token";
webhookSecretFile = "/home/mic92/buildbot-nix/github-webhook-secret";
oauthSecretFile = "/home/mic92/buildbot-nix/github-oauth-secret";
oauthId = "2516248ec6289e4d9818122cce0cbde39e4b788d";
githubUser = "mic92-buildbot";
githubAdmins = [ "Mic92" ];
};
};
}
2023-09-10 09:16:51 +00:00
buildbot-nix.nixosModules.buildbot-master
];
};
2023-09-10 10:11:50 +00:00
example-worker = lib.makeOverridable nixosSystem {
2023-09-10 09:16:51 +00:00
inherit system;
modules = [
dummy
2023-09-10 10:11:50 +00:00
{
services.buildbot-nix.worker = {
enable = true;
workerPasswordFile = "/home/mic92/buildbot-nix/worker-password";
};
}
2023-09-10 09:16:51 +00:00
buildbot-nix.nixosModules.buildbot-worker
];
};
}