2023-06-19 08:19:00 +02:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.eboskma.woodpecker;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.eboskma.woodpecker = { enable = mkEnableOption "Woodpecker CI"; };
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.woodpecker-server = {
|
|
|
|
enable = true;
|
|
|
|
environment = {
|
|
|
|
WOODPECKER_GITEA = "true";
|
|
|
|
WOODPECKER_GITEA_URL = "https://git.datarift.nl";
|
2024-01-02 22:46:36 +01:00
|
|
|
WOODPECKER_HOST = "https://ci.datarift.nl";
|
2023-06-19 08:19:00 +02:00
|
|
|
WOODPECKER_SERVER_ADDR = ":8100";
|
|
|
|
WOODPECKER_ADMIN = "erwin";
|
|
|
|
WOODPECKER_SESSION_EXPIRES = "48h";
|
|
|
|
};
|
|
|
|
environmentFile = config.sops.secrets.woodpecker-server.path;
|
|
|
|
};
|
|
|
|
services.woodpecker-agents.agents.local = {
|
|
|
|
enable = true;
|
|
|
|
environment = {
|
|
|
|
WOODPECKER_SERVER = "localhost:9000";
|
|
|
|
WOODPECKER_MAX_PROCS = "2";
|
|
|
|
WOODPECKER_BACKEND = "docker";
|
2024-01-29 10:29:42 +01:00
|
|
|
WOODPECKER_BACKEND_DOCKER_NETWORK = "podman";
|
2023-06-19 08:19:00 +02:00
|
|
|
DOCKER_HOST = "unix:///run/podman/podman.sock";
|
|
|
|
};
|
|
|
|
environmentFile = [ config.sops.secrets.woodpecker-agent.path ];
|
|
|
|
extraGroups = [ "podman" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.woodpecker-cli ];
|
|
|
|
|
2023-08-19 19:40:54 +02:00
|
|
|
networking.firewall.allowedTCPPorts = [ 8100 9000 ];
|
2023-06-19 08:19:00 +02:00
|
|
|
};
|
|
|
|
}
|