rice/hosts/ami/woodpecker.nix

60 lines
1.4 KiB
Nix
Raw Normal View History

2024-06-23 09:57:25 +00:00
{
config,
pkgs,
...
}: {
2024-06-21 09:25:02 +00:00
age.secrets.woodpecker.file = ../../secrets/woodpecker.age;
services = let
port = 3007;
2024-06-23 09:57:25 +00:00
grpc-port = 9000;
2024-06-21 09:25:02 +00:00
in {
woodpecker-server = {
enable = true;
2024-06-23 09:57:25 +00:00
package = pkgs.unstable.woodpecker-server;
2024-06-21 09:25:02 +00:00
environment = {
WOODPECKER_OPEN = "true";
WOODPECKER_ORGS = "kitchen";
WOODPECKER_ADMIN = "chef";
2024-06-21 10:08:08 +00:00
WOODPECKER_HOST = "https://build.buffets.kitchen/";
2024-06-21 09:25:02 +00:00
WOODPECKER_SERVER_ADDR = ":${toString port}";
WOODPECKER_GRPC_ADDR = ":${toString grpc-port}";
2024-06-21 09:25:02 +00:00
WOODPECKER_GITEA = "true";
WOODPECKER_GITEA_URL = "https://buffets.kitchen/";
2024-06-21 09:25:02 +00:00
};
environmentFile = config.age.secrets.woodpecker.path;
};
2024-06-23 09:57:25 +00:00
woodpecker-agents.agents = {
podman = {
package = pkgs.unstable.woodpecker-agent;
environment = {
WOODPECKER_SERVER = "localhost:${toString grpc-port}";
WOODPECKER_BACKEND = "docker";
DOCKER_HOST = "unix:///run/podman/podman.sock";
};
environmentFile = config.age.secrets.woodpecker.path;
extraGroups = ["podman"];
};
};
2024-06-21 09:25:02 +00:00
nginx = {
virtualHosts."build.buffets.kitchen" = {
useACMEHost = "buffet.sh";
forceSSL = true;
locations = {
"/" = {
proxyPass = "http://localhost:${toString port}";
};
};
};
};
};
}