From 36eb13de031d6cde63e0c617211c2272c53b6832 Mon Sep 17 00:00:00 2001 From: buffet Date: Sun, 23 Jun 2024 11:12:51 +0200 Subject: [PATCH 1/2] feat(woodpecker): use unstable.woodpecker for 2.6 --- hosts/ami/woodpecker.nix | 4 ++-- secrets/woodpecker.age | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hosts/ami/woodpecker.nix b/hosts/ami/woodpecker.nix index 4b61c12..9103c89 100644 --- a/hosts/ami/woodpecker.nix +++ b/hosts/ami/woodpecker.nix @@ -14,8 +14,8 @@ WOODPECKER_HOST = "https://build.buffets.kitchen/"; WOODPECKER_SERVER_ADDR = ":${toString port}"; - WOODPECKER_GITEA = "true"; - WOODPECKER_GITEA_URL = "https://buffets.kitchen/"; + WOODPECKER_FORGEJO = "true"; + WOODPECKER_FORGEJO_URL = "https://buffets.kitchen/"; }; environmentFile = config.age.secrets.woodpecker.path; diff --git a/secrets/woodpecker.age b/secrets/woodpecker.age index 455a15d..f7ce12f 100644 --- a/secrets/woodpecker.age +++ b/secrets/woodpecker.age @@ -1,5 +1,7 @@ age-encryption.org/v1 --> ssh-ed25519 zRvPWg J9ydyHYnmWE77Y8KaYOIkUqzv4B1Syp1EDi6DW4AaC8 -uvTZdpXqqnSL8UaSAMkQ1YZ50Latny0XqBehPpVm2dw ---- a+3mhk56fR9Q025HNLAMujPoxqdrYhMmOaBp1tZtoc0 -fv$Q|´/ ;UCoHJ<v%9:Ɂxج0,T mSgR[Ȱ\lU1y~3Z?[y\3`?J7U$dwB/kCRC\WNb$k{~>uPS1 \ No newline at end of file +-> ssh-ed25519 zRvPWg 2WXQR5WHrLyTNiJrf8E0cftYYjO0Gge0wQKFcptVeX4 +fthYF5yn1TPPuYfqqo549V/h/hsjZB3oTFHOkGlFwVM +--- iMrfA6/y0mNyz0+dgTAOj2UJ4jw+ZqFPYSIMn/KLkEw +f吧ߑ~኿_@ʋZI'3 # 4P[Hn yO6J M#mu~]gI ŇjICcO + +d?b!Qx¯Y,(77ް :n_WƣtӵKႰ `kP],=,࿊5ѡ \ No newline at end of file From 5606571943fbae1b0a90635905d939279c8957ae Mon Sep 17 00:00:00 2001 From: buffet Date: Sun, 23 Jun 2024 11:57:25 +0200 Subject: [PATCH 2/2] 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