2024-06-22 04:20:38 +02:00
|
|
|
# Sources for this configuration:
|
|
|
|
# - https://woodpecker-ci.org/docs/administration/deployment/nixos
|
|
|
|
# - https://woodpecker-ci.org/docs/administration/server-config
|
|
|
|
# - https://woodpecker-ci.org/docs/administration/database
|
|
|
|
# - https://woodpecker-ci.org/docs/administration/forges/forgejo
|
|
|
|
# - https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
|
|
|
|
|
2024-11-05 22:56:55 +01:00
|
|
|
{ config, pkgs, ... }:
|
2024-06-22 04:20:38 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
services.woodpecker-server = {
|
|
|
|
enable = true;
|
2024-11-05 22:56:55 +01:00
|
|
|
package = pkgs.woodpecker-server;
|
2024-06-22 04:20:38 +02:00
|
|
|
environment = {
|
|
|
|
WOODPECKER_HOST = "https://woodpecker.hamburg.ccc.de";
|
|
|
|
WOODPECKER_SERVER_ADDR = ":8001";
|
|
|
|
WOODPECKER_GRPC_ADDR = ":9000";
|
|
|
|
WOODPECKER_ADMIN = "june";
|
|
|
|
WOODPECKER_OPEN = "true";
|
|
|
|
WOODPECKER_ORGS = "CCCHH";
|
|
|
|
WOODPECKER_DATABASE_DRIVER = "postgres";
|
|
|
|
WOODPECKER_DATABASE_DATASOURCE = "postgresql://woodpecker-server@/woodpecker-server?host=/run/postgresql";
|
|
|
|
WOODPECKER_FORGEJO = "true";
|
|
|
|
WOODPECKER_FORGEJO_URL = "https://git.hamburg.ccc.de";
|
|
|
|
# Set via enviornmentFile:
|
|
|
|
# WOODPECKER_FORGEJO_CLIENT
|
|
|
|
# WOODPECKER_FORGEJO_SECRET
|
|
|
|
};
|
2024-06-22 16:26:58 +02:00
|
|
|
environmentFile = [ "/run/secrets/woodpecker_server_environment_file" ];
|
2024-06-22 04:20:38 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.woodpecker-server.serviceConfig = {
|
|
|
|
User = "woodpecker-server";
|
|
|
|
Group = "woodpecker-server";
|
|
|
|
};
|
|
|
|
|
|
|
|
sops.secrets."woodpecker_server_environment_file" = {
|
|
|
|
mode = "0440";
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
restartUnits = [ "woodpecker-server.service" ];
|
|
|
|
};
|
|
|
|
}
|