Skip to content

Commit cb3b743

Browse files
committed
format tree
1 parent b7a4894 commit cb3b743

File tree

3 files changed

+78
-80
lines changed

3 files changed

+78
-80
lines changed

flake.nix

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,19 @@
1919
outputs =
2020
inputs@{ flake-parts, ... }:
2121
flake-parts.lib.mkFlake { inherit inputs; } {
22-
imports =
23-
[
24-
./examples/flake-module.nix
25-
./devShells/flake-module.nix
26-
./nixosModules/flake-module.nix
27-
./nix/flake-module.nix
28-
./checks/flake-module.nix
29-
./packages/flake-module.nix
30-
]
31-
++ inputs.nixpkgs.lib.optional (inputs.treefmt-nix ? flakeModule) ./formatter/flake-module.nix
32-
++ inputs.nixpkgs.lib.optionals (inputs.hercules-ci-effects ? flakeModule) [
33-
inputs.hercules-ci-effects.flakeModule
34-
./herculesCI/flake-module.nix
35-
];
22+
imports = [
23+
./examples/flake-module.nix
24+
./devShells/flake-module.nix
25+
./nixosModules/flake-module.nix
26+
./nix/flake-module.nix
27+
./checks/flake-module.nix
28+
./packages/flake-module.nix
29+
]
30+
++ inputs.nixpkgs.lib.optional (inputs.treefmt-nix ? flakeModule) ./formatter/flake-module.nix
31+
++ inputs.nixpkgs.lib.optionals (inputs.hercules-ci-effects ? flakeModule) [
32+
inputs.hercules-ci-effects.flakeModule
33+
./herculesCI/flake-module.nix
34+
];
3635

3736
systems = [
3837
"x86_64-linux"

nixosModules/master.nix

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -843,29 +843,30 @@ in
843843
path = [ pkgs.openssl ];
844844
serviceConfig = {
845845
# in master.py we read secrets from $CREDENTIALS_DIRECTORY
846-
LoadCredential =
847-
[ "buildbot-nix-workers:${cfg.workersFile}" ]
848-
++ lib.optionals cfg.github.enable (
849-
[ "github-webhook-secret:${cfg.github.webhookSecretFile}" ]
850-
++ lib.optional (
851-
cfg.github.authType ? "legacy"
852-
) "github-token:${cfg.github.authType.legacy.tokenFile}"
853-
++ lib.optional (
854-
cfg.github.authType ? "app"
855-
) "github-app-secret-key:${cfg.github.authType.app.secretKeyFile}"
856-
)
857-
++ lib.optional (cfg.authBackend == "gitea") "gitea-oauth-secret:${cfg.gitea.oauthSecretFile}"
858-
++ lib.optional (cfg.authBackend == "github") "github-oauth-secret:${cfg.github.oauthSecretFile}"
859-
++ lib.optionals cfg.gitea.enable [
860-
"gitea-token:${cfg.gitea.tokenFile}"
861-
"gitea-webhook-secret:${cfg.gitea.webhookSecretFile}"
862-
]
863-
++ lib.mapAttrsToList (
864-
repoName: path: "effects-secret__${cleanUpRepoName repoName}:${path}"
865-
) cfg.effects.perRepoSecretFiles
866-
++ lib.mapAttrsToList (
867-
repoName: repo: "pull-based__${cleanUpRepoName repoName}:${repo.sshPrivateKeyFile}"
868-
) (lib.filterAttrs (_: repo: repo.sshPrivateKeyFile != null) cfg.pullBased.repositories);
846+
LoadCredential = [
847+
"buildbot-nix-workers:${cfg.workersFile}"
848+
]
849+
++ lib.optionals cfg.github.enable (
850+
[ "github-webhook-secret:${cfg.github.webhookSecretFile}" ]
851+
++ lib.optional (
852+
cfg.github.authType ? "legacy"
853+
) "github-token:${cfg.github.authType.legacy.tokenFile}"
854+
++ lib.optional (
855+
cfg.github.authType ? "app"
856+
) "github-app-secret-key:${cfg.github.authType.app.secretKeyFile}"
857+
)
858+
++ lib.optional (cfg.authBackend == "gitea") "gitea-oauth-secret:${cfg.gitea.oauthSecretFile}"
859+
++ lib.optional (cfg.authBackend == "github") "github-oauth-secret:${cfg.github.oauthSecretFile}"
860+
++ lib.optionals cfg.gitea.enable [
861+
"gitea-token:${cfg.gitea.tokenFile}"
862+
"gitea-webhook-secret:${cfg.gitea.webhookSecretFile}"
863+
]
864+
++ lib.mapAttrsToList (
865+
repoName: path: "effects-secret__${cleanUpRepoName repoName}:${path}"
866+
) cfg.effects.perRepoSecretFiles
867+
++ lib.mapAttrsToList (
868+
repoName: repo: "pull-based__${cleanUpRepoName repoName}:${repo.sshPrivateKeyFile}"
869+
) (lib.filterAttrs (_: repo: repo.sshPrivateKeyFile != null) cfg.pullBased.repositories);
869870
RuntimeDirectory = "buildbot-master";
870871
};
871872
};
@@ -883,30 +884,29 @@ in
883884

884885
services.nginx.enable = true;
885886
services.nginx.virtualHosts.${cfg.domain} = {
886-
locations =
887-
{
888-
"/".proxyPass = "http://127.0.0.1:${builtins.toString backendPort}/";
889-
"/sse" = {
890-
proxyPass = "http://127.0.0.1:${builtins.toString backendPort}/sse";
891-
# proxy buffering will prevent sse to work
892-
extraConfig = "proxy_buffering off;";
893-
};
894-
"/ws" = {
895-
proxyPass = "http://127.0.0.1:${builtins.toString backendPort}/ws";
896-
proxyWebsockets = true;
897-
# raise the proxy timeout for the websocket
898-
extraConfig = "proxy_read_timeout 6000s;";
899-
};
900-
}
901-
// lib.optionalAttrs (cfg.outputsPath != null) {
902-
"/nix-outputs/" = {
903-
alias = cfg.outputsPath;
904-
extraConfig = ''
905-
charset utf-8;
906-
autoindex on;
907-
'';
908-
};
887+
locations = {
888+
"/".proxyPass = "http://127.0.0.1:${builtins.toString backendPort}/";
889+
"/sse" = {
890+
proxyPass = "http://127.0.0.1:${builtins.toString backendPort}/sse";
891+
# proxy buffering will prevent sse to work
892+
extraConfig = "proxy_buffering off;";
909893
};
894+
"/ws" = {
895+
proxyPass = "http://127.0.0.1:${builtins.toString backendPort}/ws";
896+
proxyWebsockets = true;
897+
# raise the proxy timeout for the websocket
898+
extraConfig = "proxy_read_timeout 6000s;";
899+
};
900+
}
901+
// lib.optionalAttrs (cfg.outputsPath != null) {
902+
"/nix-outputs/" = {
903+
alias = cfg.outputsPath;
904+
extraConfig = ''
905+
charset utf-8;
906+
autoindex on;
907+
'';
908+
};
909+
};
910910
};
911911

912912
systemd.tmpfiles.rules =

packages/flake-module.nix

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,25 @@
77
...
88
}:
99
{
10-
packages =
11-
{
12-
# useful for checking what buildbot version is used.
13-
buildbot = pkgs.callPackage ./buildbot.nix { };
14-
buildbot-dev = pkgs.python3.pkgs.callPackage ./buildbot-dev.nix {
15-
inherit (self'.packages)
16-
buildbot-gitea
17-
buildbot-effects
18-
buildbot-nix
19-
buildbot
20-
;
21-
inherit (pkgs) buildbot-worker buildbot-plugins;
22-
};
23-
buildbot-nix = pkgs.python3.pkgs.callPackage ./buildbot-nix.nix { };
24-
buildbot-gitea = pkgs.python3.pkgs.callPackage ./buildbot-gitea.nix {
25-
buildbot = pkgs.buildbot;
26-
};
27-
}
28-
// lib.optionalAttrs pkgs.stdenv.isLinux {
29-
buildbot-effects = pkgs.python3.pkgs.callPackage ./buildbot-effects.nix { };
10+
packages = {
11+
# useful for checking what buildbot version is used.
12+
buildbot = pkgs.callPackage ./buildbot.nix { };
13+
buildbot-dev = pkgs.python3.pkgs.callPackage ./buildbot-dev.nix {
14+
inherit (self'.packages)
15+
buildbot-gitea
16+
buildbot-effects
17+
buildbot-nix
18+
buildbot
19+
;
20+
inherit (pkgs) buildbot-worker buildbot-plugins;
3021
};
22+
buildbot-nix = pkgs.python3.pkgs.callPackage ./buildbot-nix.nix { };
23+
buildbot-gitea = pkgs.python3.pkgs.callPackage ./buildbot-gitea.nix {
24+
buildbot = pkgs.buildbot;
25+
};
26+
}
27+
// lib.optionalAttrs pkgs.stdenv.isLinux {
28+
buildbot-effects = pkgs.python3.pkgs.callPackage ./buildbot-effects.nix { };
29+
};
3130
};
3231
}

0 commit comments

Comments
 (0)