From 8f4e9bf14ed7cd9555006d1d20d8222e10cd8bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Mon, 9 Jun 2025 01:40:06 +0300 Subject: [PATCH] Add Forgejo runner to CI host config --- hosts/ci/configuration.nix | 2 ++ servers/ci.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 servers/ci.nix diff --git a/hosts/ci/configuration.nix b/hosts/ci/configuration.nix index e0f9428..f24380b 100644 --- a/hosts/ci/configuration.nix +++ b/hosts/ci/configuration.nix @@ -4,5 +4,7 @@ ../../shared/base.nix ../../shared/hardware/vm.nix ../../shared/disko/basic-ext4.nix + + ../../servers/ci.nix ]; } diff --git a/servers/ci.nix b/servers/ci.nix new file mode 100644 index 0000000..769fabb --- /dev/null +++ b/servers/ci.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: +{ + networking.firewall.trustedInterfaces = [ "br-+" ]; + + services.gitea-actions-runner = { + package = pkgs.forgejo-runner; + instances."forgejo.sinerva.eu" = { + enable = true; + name = "ci-forgejo-runner"; + tokenFile = "/persist/secrets/forgejo_token"; + url = "https://code.forgejo.org/"; + labels = [ + "Ubuntu-24.04-LTS:docker://ubuntu:24.04" + "nixos-latest:docker://nixos/nix" + ]; + }; + }; + + virtualisation.docker = { + enable = true; + daemon.settings = { + fixed-cidr-v6 = "fd00::/80"; + ipv6 = true; + }; + }; +}