From 5606571943fbae1b0a90635905d939279c8957ae Mon Sep 17 00:00:00 2001 From: buffet Date: Sun, 23 Jun 2024 11:57:25 +0200 Subject: [PATCH] feat(woodpecker): set up agent --- hosts/ami/woodpecker.nix | 24 +++++++++++++++++++++++- secrets/woodpecker.age | Bin 358 -> 447 bytes 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/hosts/ami/woodpecker.nix b/hosts/ami/woodpecker.nix index 9103c89..f771ea9 100644 --- a/hosts/ami/woodpecker.nix +++ b/hosts/ami/woodpecker.nix @@ -1,11 +1,17 @@ -{config, ...}: { +{ + config, + pkgs, + ... +}: { age.secrets.woodpecker.file = ../../secrets/woodpecker.age; services = let port = 3007; + grpc-port = 9000; in { woodpecker-server = { enable = true; + package = pkgs.unstable.woodpecker-server; environment = { WOODPECKER_OPEN = "true"; @@ -13,6 +19,7 @@ WOODPECKER_ADMIN = "chef"; WOODPECKER_HOST = "https://build.buffets.kitchen/"; WOODPECKER_SERVER_ADDR = ":${toString port}"; + WOODPECKER_GRPC_ADDR = ":${toString port}"; WOODPECKER_FORGEJO = "true"; WOODPECKER_FORGEJO_URL = "https://buffets.kitchen/"; @@ -21,6 +28,21 @@ environmentFile = config.age.secrets.woodpecker.path; }; + 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"]; + }; + }; + nginx = { virtualHosts."build.buffets.kitchen" = { useACMEHost = "buffet.sh"; diff --git a/secrets/woodpecker.age b/secrets/woodpecker.age index f7ce12f457c718c155c7bbaa02749da78758990c..750faf7c51d6b1ab8cccfea6e243ea61aba580e8 100644 GIT binary patch delta 413 zcmV;O0b>5<0>1;0EPr=nL{B+oM>lmya#eF~aByQ|SWi=Wa#eanOK(kXHfBwBVR~vy zXILvUYYIa&cXe}NM`cQDb1PzMQbb`dY)e{bF?m!uQfz2VNjNb!GI~T}YC|h8FbXX# zEg&yyLu^uRa6xWxNkeT)N-|njM`2e+NHuGCL_}sYGHYRTczVwqOFDlrS>fn^ie3QH_SjwhTMU;qAukrhe;vEQrK(Bc{ogu(*cDWpE) zp<;QdTLr2-WeugEd*frTfl~;ctRhjE@Y1Y;ksn%URP%VMfUPDD6?GNHe7)FlerW(= zLUTZ!jy*G5ZGS8fwQEr%CbGjCKzNKb1=Y({rhO$se7 zEg)%4a%Mp`FL^L+PI-DTD`aO>K~HKjRZ28!cPm7~~Pc}*m zO(Sj5b>ixc{C?YAX94ry?-$oepWR3D33RnH