From a5421a3505fd4f18158b45d367bfacfe9dfa31d1 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 | 27 +++++++++++++++++++++++++++ 2 files changed, 29 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..2b1bf37 --- /dev/null +++ b/servers/ci.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +{ + networking.firewall.trustedInterfaces = [ "br-+" ]; + + services.gitea-actions-runner = { + package = pkgs.forgejo-runner; + instances.default = { + enable = true; + name = "forgejo"; + url = "https://forgejo.sinerva.eu"; + tokenFile = "/persist/secrets/forgejo_token"; + labels = [ + "ubuntu-24.04-lts:docker://ubuntu:24.04" + "ubuntu-22.04:docker://node:24-bullseye" + "nixos-latest:docker://nixos/nix" + ]; + }; + }; + + virtualisation.docker = { + enable = true; + daemon.settings = { + fixed-cidr-v6 = "fd00::/80"; + ipv6 = true; + }; + }; +}