jopejoe1
e404d4740f
the current version of woodpecker-server in stable now has the features this was original used for, not other usages of unstable are in tree left so removing it.
30 lines
930 B
Nix
30 lines
930 B
Nix
# Sources for this configuration:
|
|
# - https://woodpecker-ci.org/docs/administration/deployment/nixos
|
|
# - https://woodpecker-ci.org/docs/administration/agent-config
|
|
# - https://woodpecker-ci.org/docs/administration/backends/docker
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
services.woodpecker-agents.agents."docker" = {
|
|
enable = true;
|
|
package = pkgs.woodpecker-agent;
|
|
extraGroups = [ "docker" ];
|
|
environment = {
|
|
WOODPECKER_SERVER = "localhost${config.services.woodpecker-server.environment.WOODPECKER_GRPC_ADDR}";
|
|
WOODPECKER_MAX_WORKFLOWS = "4";
|
|
WOODPECKER_BACKEND = "docker";
|
|
# Set via enviornmentFile:
|
|
# WOODPECKER_AGENT_SECRET
|
|
};
|
|
environmentFile = [ "/run/secrets/woodpecker_agent_environment_file" ];
|
|
};
|
|
|
|
sops.secrets."woodpecker_agent_environment_file" = {
|
|
mode = "0440";
|
|
owner = "root";
|
|
group = "root";
|
|
restartUnits = [ "woodpecker-agent-docker.service" ];
|
|
};
|
|
}
|