add some example nixos configuration
This commit is contained in:
parent
6fbe58a327
commit
f81c71a328
|
@ -1,7 +1,7 @@
|
||||||
{ nixpkgs, system, buildbot-nix, ... }:
|
{ nixpkgs, system, buildbot-nix, ... }:
|
||||||
let
|
let
|
||||||
# some example configuration to make it eval
|
# some example configuration to make it eval
|
||||||
dummy = { config, ... }: {
|
dummy = { config, modulesPath, ... }: {
|
||||||
networking.hostName = "example-common";
|
networking.hostName = "example-common";
|
||||||
system.stateVersion = config.system.nixos.version;
|
system.stateVersion = config.system.nixos.version;
|
||||||
users.users.root.initialPassword = "fnord23";
|
users.users.root.initialPassword = "fnord23";
|
||||||
|
@ -11,21 +11,40 @@ let
|
||||||
|
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
inherit (lib) nixosSystem;
|
inherit (lib) nixosSystem;
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# General
|
example-master = lib.makeOverridable nixosSystem {
|
||||||
example-master = nixosSystem {
|
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
dummy
|
dummy
|
||||||
|
{
|
||||||
|
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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
buildbot-nix.nixosModules.buildbot-master
|
buildbot-nix.nixosModules.buildbot-master
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
example-worker = nixosSystem {
|
example-worker = lib.makeOverridable nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
dummy
|
dummy
|
||||||
|
{
|
||||||
|
services.buildbot-nix.worker = {
|
||||||
|
enable = true;
|
||||||
|
workerPasswordFile = "/home/mic92/buildbot-nix/worker-password";
|
||||||
|
};
|
||||||
|
}
|
||||||
buildbot-nix.nixosModules.buildbot-worker
|
buildbot-nix.nixosModules.buildbot-worker
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
outputs = inputs@{ self, flake-parts, ... }:
|
outputs = inputs@{ self, flake-parts, ... }:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
|
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
|
||||||
systems = lib.systems.flakeExposed;
|
systems = [ "x86_64-linux" ];
|
||||||
flake = {
|
flake = {
|
||||||
nixosModules.buildbot-master = ./nix/master.nix;
|
nixosModules.buildbot-master = ./nix/master.nix;
|
||||||
nixosModules.buildbot-worker = ./nix/worker.nix;
|
nixosModules.buildbot-worker = ./nix/worker.nix;
|
||||||
|
|
|
@ -59,10 +59,12 @@ in
|
||||||
};
|
};
|
||||||
buildSystems = lib.mkOption {
|
buildSystems = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ pkgs.hostPlatform.system ];
|
||||||
description = "Systems that we will be build";
|
description = "Systems that we will be build";
|
||||||
};
|
};
|
||||||
evalMaxMemorySize = lib.mkOption {
|
evalMaxMemorySize = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
default = "2048";
|
||||||
description = ''
|
description = ''
|
||||||
Maximum memory size for nix-eval-jobs (in MiB) per
|
Maximum memory size for nix-eval-jobs (in MiB) per
|
||||||
worker. After the limit is reached, the worker is
|
worker. After the limit is reached, the worker is
|
||||||
|
@ -113,6 +115,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
ensureDatabases = [ "buildbot" ];
|
ensureDatabases = [ "buildbot" ];
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,6 @@ in
|
||||||
};
|
};
|
||||||
workerPasswordFile = lib.mkOption {
|
workerPasswordFile = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "/var/lib/buildbot-worker/worker-password";
|
|
||||||
description = "The buildbot worker password file.";
|
description = "The buildbot worker password file.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue