From 01d87d85c533dac3433f1d158705cf75362328fa Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Sat, 4 Jan 2025 19:54:51 +0400 Subject: [PATCH] im running --- modules/server/services/forgejo/default.nix | 1 + modules/server/services/forgejo/runner.nix | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 modules/server/services/forgejo/runner.nix diff --git a/modules/server/services/forgejo/default.nix b/modules/server/services/forgejo/default.nix index bde07db1..cff7116a 100644 --- a/modules/server/services/forgejo/default.nix +++ b/modules/server/services/forgejo/default.nix @@ -2,6 +2,7 @@ with lib; let cfg = config.void.server.services.forgejo; in { + imports = [ ./runner.nix ]; options.void.server.services.forgejo = { enable = mkEnableOption false; }; config = mkIf cfg.enable { diff --git a/modules/server/services/forgejo/runner.nix b/modules/server/services/forgejo/runner.nix new file mode 100644 index 00000000..8f093526 --- /dev/null +++ b/modules/server/services/forgejo/runner.nix @@ -0,0 +1,20 @@ +{ config, lib, ... }: +with lib; +let cfg = config.void.server.services.forgejo.runner; +in { + options.void.server.services.forgejo.runner = { + enable = mkEnableOption false; + }; + config = mkIf cfg.enable { + + virtualisation.docker.enable = true; + + services.gitea-actions-runner.instances.one = { + name = "sakoserver-runner"; + enable = true; + labels = [ "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest" ]; + tokenFile = "/srv/secrets/gitea-actions-runner.env"; + url = "https://git.sako.lol"; + }; + }; +}