infra/hosts/flora-6/apps/forgejo-actions-runner.nix

39 lines
1.2 KiB
Nix
Raw Normal View History

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";
};
networking.firewall.trustedInterfaces = [ "gitea-actions" ];
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 = {
package = pkgs.forgejo-actions-runner;
instances."flora-6" = {
enable = true;
name = config.networking.hostName;
url = "https://git.pub.solar";
tokenFile = config.age.secrets.forgejo-actions-runner-token.path;
settings.container.network = "gitea-actions";
2023-11-06 20:28:05 +00:00
labels = [
# provide a debian 12 bookworm base with Node.js for actions
"debian-latest:docker://node:20-bookworm"
2023-11-06 20:28:05 +00:00
# fake the ubuntu name, commonly used in actions examples
"ubuntu-latest:docker://node:20-bookworm"
# 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"
];
};
};
}