nemo: deploy woodpecker agent
This commit is contained in:
parent
0e7f1a4e36
commit
79cbb2462a
4 changed files with 76 additions and 40 deletions
hosts/nemo
|
@ -7,7 +7,10 @@
|
|||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./woodpecker.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
extraModulePackages = with config.boot.kernelPackages; [
|
||||
|
|
33
hosts/nemo/woodpecker.nix
Normal file
33
hosts/nemo/woodpecker.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.woodpecker-agents.agents.docker = {
|
||||
enable = true;
|
||||
package = pkgs.woodpecker-agent;
|
||||
environment = {
|
||||
DOCKER_HOST = "unix:///run/podman/podman.sock";
|
||||
WOODPECKER_BACKEND = "docker";
|
||||
WOODPECKER_SERVER = "10.1.100.10:8300"; # forgejo-1
|
||||
WOODPECKER_MAX_WORKFLOWS = "5";
|
||||
WOODPECKER_BACKEND_DOCKER_VOLUMES = "/nix:/mnt/nix:ro";
|
||||
};
|
||||
environmentFile = [
|
||||
"/etc/woodpecker/woodpecker-agent.env"
|
||||
];
|
||||
extraGroups = [ "podman" ];
|
||||
};
|
||||
|
||||
systemd.services.woodpecker-agent-docker = {
|
||||
after = [
|
||||
"podman.socket"
|
||||
"woodpecker-server.service"
|
||||
];
|
||||
# restartIfChanged = false;
|
||||
serviceConfig = {
|
||||
BindPaths = [ "/run/podman/podman.sock" ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue