This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
nixos-config/system/monolith-gitlab-runner.nix

31 lines
1.1 KiB
Nix
Raw Normal View History

2023-11-29 21:42:47 +01:00
{ config, pkgs, lib, ... }:
let
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
in
{
2022-10-06 17:49:48 +02:00
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
virtualisation.docker.enable = true;
2022-12-02 18:40:11 +01:00
services.gitlab-runner = {
2022-10-06 17:49:48 +02:00
enable = true;
2022-12-02 18:40:11 +01:00
settings.concurrent = 4;
2022-10-06 17:49:48 +02:00
services = {
2022-12-23 15:22:58 +01:00
# ci_test = {
# registrationConfigFile = "/srv/gitlab-runner/env/ci_test";
# dockerImage = "debian";
# dockerPrivileged = true;
# };
2022-10-06 17:49:48 +02:00
thoreb_builder = {
2022-12-23 15:22:58 +01:00
registrationConfigFile = config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
2022-10-06 17:49:48 +02:00
dockerImage = "debian";
dockerPrivileged = true;
2022-10-06 17:49:48 +02:00
};
2023-02-24 16:37:35 +01:00
# runner for building in docker via host's nix-daemon
# nix store will be readable in runner, might be insecure
2023-11-29 21:42:47 +01:00
thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path;
thoreb-itinerario-nix = mkNixRunner config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
2022-10-06 17:49:48 +02:00
};
};
2022-11-05 13:48:46 +01:00
systemd.services.gitlab-runner.serviceConfig.Nice = 10;
2022-10-06 17:49:48 +02:00
}