From 353481f3f2ae655fd88b3b535e263f8f2e03665a Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Fri, 1 Nov 2024 13:55:29 +0530 Subject: [PATCH] winne, rico2: setup act cache --- .../services/apps/forgejo-actions-runner.nix | 8 ++++++++ hosts/shared/blocky.nix | 1 + hosts/wynne/services/apps/forgejo.nix | 15 +++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/hosts/rico2/services/apps/forgejo-actions-runner.nix b/hosts/rico2/services/apps/forgejo-actions-runner.nix index c64da53..3157aa7 100644 --- a/hosts/rico2/services/apps/forgejo-actions-runner.nix +++ b/hosts/rico2/services/apps/forgejo-actions-runner.nix @@ -20,6 +20,14 @@ ]; tokenFile = config.sops.secrets."forgejo/runner_registration_token_file".path; url = "https://forge.acomputer.lol"; + settings = { + log.level = "info"; + cache = { + enabled = true; + host = "192.168.1.12"; + external_server = "https://act-cache.labs.adtya.xyz/"; + }; + }; }; }; }; diff --git a/hosts/shared/blocky.nix b/hosts/shared/blocky.nix index 4a0543c..f3f9500 100644 --- a/hosts/shared/blocky.nix +++ b/hosts/shared/blocky.nix @@ -66,6 +66,7 @@ # Services "alertmanager.labs.adtya.xyz" = "10.10.10.12"; + "act-cache.labs.adtya.xyz" = "10.10.10.13"; "blocky.rico1.labs.adtya.xyz" = "10.10.10.11"; "blocky.rico2.labs.adtya.xyz" = "10.10.10.12"; "grafana.labs.adtya.xyz" = "10.10.10.12"; diff --git a/hosts/wynne/services/apps/forgejo.nix b/hosts/wynne/services/apps/forgejo.nix index d523dc5..2cbf247 100644 --- a/hosts/wynne/services/apps/forgejo.nix +++ b/hosts/wynne/services/apps/forgejo.nix @@ -2,6 +2,7 @@ let cfg = config.services.forgejo; domainName = "forge.acomputer.lol"; + inherit (import ../../../shared/caddy-helpers.nix) logFormat; in { sops.secrets = { @@ -12,6 +13,12 @@ in }; }; services = { + caddy.virtualHosts."act-cache.labs.adtya.xyz" = { + inherit logFormat; + extraConfig = '' + reverse_proxy 127.0.0.1:7777 + ''; + }; gitea-actions-runner = { package = pkgs.forgejo-runner; instances = { @@ -26,6 +33,14 @@ in ]; tokenFile = config.sops.secrets."forgejo/runner_registration_token_file".path; url = "https://${domainName}"; + settings = { + log.level = "info"; + cache = { + enabled = true; + port = 7777; + external_server = "https://act-cache.labs.adtya.xyz/"; + }; + }; }; }; };