forked from DGNum/infrastructure
Tom Hubrecht
88d9b8c3e3
Signed-off-by: Tom Hubrecht <tom.hubrecht@dgnum.eu> Acked-by: Ryan Lahfa <ryan.lahfa@dgnum.eu> Acked-by: Maurice Debray <maurice.debray@dgnum.eu> Acked-by: Lubin Bailly <lubin.bailly@dgnum.eu> Acked-by: Jean-Marc Gailis <jean-marc.gailis@dgnum.eu> as the legal authority, at the time of writing, in DGNum. Acked-by: Elias Coppens <elias.coppens@dgnum.eu> as a member, at the time of writing, of the DGNum executive counsel.
85 lines
1.5 KiB
Nix
85 lines
1.5 KiB
Nix
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
|
|
#
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
let
|
|
url = "https://git.dgnum.eu";
|
|
|
|
mkRunner =
|
|
{
|
|
labels,
|
|
name,
|
|
token,
|
|
}:
|
|
{
|
|
enable = true;
|
|
|
|
inherit
|
|
name
|
|
labels
|
|
token
|
|
url
|
|
;
|
|
|
|
settings.container = {
|
|
network = "host";
|
|
options = "--cpus=4";
|
|
};
|
|
};
|
|
in
|
|
{
|
|
services.forgejo-nix-runners = {
|
|
enable = true;
|
|
|
|
inherit url;
|
|
|
|
storePath = "/data/slow";
|
|
tokenFile = config.age.secrets."forgejo_runners-token_file".path;
|
|
|
|
dependencies = [
|
|
pkgs.npins
|
|
pkgs.tea
|
|
];
|
|
|
|
containerOptions = [ "--cpus=4" ];
|
|
|
|
nbRunners = 6;
|
|
};
|
|
|
|
services.gitea-actions-runner.instances = builtins.mapAttrs (_: mkRunner) {
|
|
runner01 = {
|
|
token = "qT9nZXKgLcb3fWOj7VTj3S58raiCWwF0weuIIKlY";
|
|
name = "storage01 [debian]";
|
|
|
|
labels = [ "debian-latest:docker://node:20-bookworm" ];
|
|
};
|
|
|
|
runner02 = {
|
|
token = "m0rUDBxxkMb6xLTmPFwIieHswJFROqPFByPlT3V9";
|
|
name = "storage01 [debian]";
|
|
|
|
labels = [ "debian-latest:docker://node:20-bookworm" ];
|
|
};
|
|
};
|
|
|
|
virtualisation = {
|
|
podman = {
|
|
enable = true;
|
|
|
|
defaultNetwork.settings = {
|
|
dns_enable = true;
|
|
ipv6_enabled = true;
|
|
};
|
|
};
|
|
|
|
containers.storage.settings = {
|
|
storage = {
|
|
driver = "overlay";
|
|
graphroot = "/data/slow/containers/storage";
|
|
runroot = "/run/containers/storage";
|
|
};
|
|
};
|
|
};
|
|
}
|