From 0b7a085f3cf67bd773b87af2900f2e3098722b7e Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Sun, 14 Jul 2024 00:51:33 -0400 Subject: [PATCH] Infini-DL360/forgejo: enable actions runner --- hosts/Infini-DL360/forgejo.nix | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/hosts/Infini-DL360/forgejo.nix b/hosts/Infini-DL360/forgejo.nix index d29144d..4b81510 100644 --- a/hosts/Infini-DL360/forgejo.nix +++ b/hosts/Infini-DL360/forgejo.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, pkgs, common, ... }: let cfg = config.services.forgejo; domain = config.common.subdomain "git"; @@ -58,6 +58,34 @@ in }; }; + services.gitea-actions-runner.package = pkgs.forgejo-runner; + services.gitea-actions-runner.instances = { + local_priviledged = { + enable = true; + name = "Local Priviledged"; + url = "https://${domain}"; + token = common.forgejo.actions.global_token; + labels = [ + "local:host" + ]; + hostPackages = with pkgs; [ + bash + coreutils + curl + gawk + gitMinimal + gnused + nodejs + wget + ]; + }; + local = { + enable = false; + token = common.forgejo.actions.global_token; + labels = [ ]; + }; + }; + services.nginx.virtualHosts.${domain} = config.common.nginx.ssl // { locations."/" = { proxyPass = "http://${cfg.settings.server.DOMAIN}:${toString cfg.settings.server.HTTP_PORT}";