feat(forgejo-runners): Use a multiuser nix installation

This commit is contained in:
sinavir 2025-04-13 14:47:33 +02:00 committed by thubrecht
parent e7b76d1579
commit fc7620a338
4 changed files with 641 additions and 1 deletions

View file

@ -11,11 +11,12 @@ lib.extra.mkConfig {
enabledServices = [
"nix-builder"
"forgejo-multiuser-runner"
];
extraConfig = {
dgn-forgejo-runners = {
nbRunners = 16;
nbRunners = 32;
dataDirectory = "/data";
};

View file

@ -0,0 +1,43 @@
# SPDX-FileCopyrightText: 2025 Maurice Debray <maurice.debray@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{
name,
pkgs,
config,
...
}:
{
services.forgejo-multiuser-nix-runners = {
enable = true;
url = "https://git.dgnum.eu";
storePath = "/data/multiuser-nix";
tokenFile = config.age.secrets."forgejo_runners-token_file".path;
names = [
"on-${name}"
"nix"
];
dependencies = [
pkgs.tea
];
containerOptions = [ "--cpus=4" ];
nbRunners = 8;
};
virtualisation = {
podman = {
enable = true;
defaultNetwork.settings = {
dns_enable = true;
ipv6_enabled = true;
};
};
};
}