43 lines
1.3 KiB
Nix
43 lines
1.3 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
sops.secrets.gitlab-runner_fablab-nea-hcloud-labsync = {
|
|
sopsFile = ../secrets.yaml;
|
|
};
|
|
services.gitlab-runner = {
|
|
enable = true;
|
|
extraPackages = [
|
|
#(pkgs.writeShellScriptBin "docker-machine" ''
|
|
# exec ${pkgs.docker-machine-gitlab}/bin/docker-machine --debug "$@"
|
|
#'')
|
|
pkgs.docker-machine-gitlab
|
|
];
|
|
#settings.log_level = "debug";
|
|
services."fablab-nea-hcloud-labsync" = {
|
|
description = "FabLab NEA Hetzner Cloud - labsync image builder";
|
|
limit = 5;
|
|
executor = "docker+machine";
|
|
registrationConfigFile = config.sops.secrets.gitlab-runner_fablab-nea-hcloud-labsync.path;
|
|
dockerImage = "quay.io/official-images/alpine:latest";
|
|
dockerPrivileged = true;
|
|
tagList = [
|
|
"labsync-image"
|
|
];
|
|
maximumTimeout = 6 * 60 * 60;
|
|
registrationFlags = [
|
|
"--docker-tlsverify"
|
|
"--machine-idle-nodes 0"
|
|
"--machine-idle-scale-factor 0.0"
|
|
"--machine-idle-count-min 0"
|
|
"--machine-idle-time 900"
|
|
"--machine-max-builds 100"
|
|
"--machine-machine-driver hetzner"
|
|
"--machine-machine-name gitlabrunner-%s"
|
|
] ++ (map (o: "--machine-machine-options=" + o) [
|
|
"hetzner-image=debian-12"
|
|
"hetzner-server-type=cx11"
|
|
"hetzner-server-location=nbg1"
|
|
]);
|
|
};
|
|
};
|
|
}
|