2023-11-06 20:28:05 +00:00
|
|
|
{ config
|
|
|
|
, lib
|
|
|
|
, pkgs
|
|
|
|
, flake
|
|
|
|
, ...
|
|
|
|
}: {
|
|
|
|
age.secrets.forgejo-actions-runner-token = {
|
|
|
|
file = "${flake.self}/secrets/forgejo-actions-runner-token.age";
|
|
|
|
mode = "644";
|
|
|
|
};
|
|
|
|
|
2023-12-12 18:58:07 +00:00
|
|
|
# Trust docker bridge interface traffic
|
|
|
|
# Needed for the docker runner to communicate with the act_runner cache
|
|
|
|
networking.firewall.trustedInterfaces = [ "br-+" ];
|
|
|
|
|
2024-04-23 12:50:48 +00:00
|
|
|
systemd.services."gitea-runner-flora\\x2d6".serviceConfig = {
|
|
|
|
CacheDirectory = "/data/gitea-actions-runner";
|
|
|
|
};
|
2023-11-06 20:28:05 +00:00
|
|
|
# forgejo actions runner
|
|
|
|
# https://forgejo.org/docs/latest/admin/actions/
|
|
|
|
# https://docs.gitea.com/usage/actions/quickstart
|
|
|
|
services.gitea-actions-runner = {
|
2024-04-22 22:38:53 +00:00
|
|
|
package = pkgs.forgejo-runner;
|
2023-11-06 20:28:05 +00:00
|
|
|
instances."flora-6" = {
|
|
|
|
enable = true;
|
|
|
|
name = config.networking.hostName;
|
|
|
|
url = "https://git.pub.solar";
|
|
|
|
tokenFile = config.age.secrets.forgejo-actions-runner-token.path;
|
2024-04-23 12:50:48 +00:00
|
|
|
settings = {
|
|
|
|
cache = {
|
|
|
|
enabled = true;
|
|
|
|
dir = "/data/gitea-actions-runner/actcache";
|
|
|
|
host = "";
|
|
|
|
port = 0;
|
|
|
|
external_server = "";
|
|
|
|
};
|
|
|
|
};
|
2023-11-06 20:28:05 +00:00
|
|
|
labels = [
|
2023-11-09 01:33:14 +00:00
|
|
|
# provide a debian 12 bookworm base with Node.js for actions
|
2023-12-29 18:26:43 +00:00
|
|
|
"debian-latest:docker://git.pub.solar/pub-solar/actions-base-image:20-bookworm"
|
2023-11-06 20:28:05 +00:00
|
|
|
# fake the ubuntu name, commonly used in actions examples
|
2023-12-29 18:26:43 +00:00
|
|
|
"ubuntu-latest:docker://git.pub.solar/pub-solar/actions-base-image:20-bookworm"
|
2023-11-09 01:33:14 +00:00
|
|
|
# alpine with Node.js
|
|
|
|
"alpine-latest:docker://node:20-alpine"
|
|
|
|
# nix flakes enabled image with Node.js
|
2023-11-06 20:28:05 +00:00
|
|
|
"nix-flakes:docker://git.pub.solar/pub-solar/nix-flakes-node:latest"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|