ops/nixos: add gitlab-runner-cacher, unassign clouvider-lon01, assign cofractal-ams01

This commit is contained in:
Luke Granger-Brown 2023-03-11 18:15:45 +00:00
parent bd30c854b3
commit 9d6aa88d2d
3 changed files with 39 additions and 32 deletions

View file

@ -256,38 +256,6 @@
(bindMountSvcDynamic "factorio" "factorio.service") (bindMountSvcDynamic "factorio" "factorio.service")
]; ];
my.vault.secrets.gitlab-runner-environment = {
restartUnits = ["gitlab-runner.service"];
group = "root";
template = ''
{{ with secret "kv/apps/gitlab-runner" }}
{{ .Data.data.environment }}
{{ end }}
'';
};
services.gitlab-runner = {
enable = true;
settings.concurrent = 1;
services = {
deployer = {
registrationConfigFile = config.my.vault.secrets.gitlab-runner-environment.path;
executor = "shell";
tagList = [ "cacher" ];
};
};
gracefulTermination = true;
gracefulTimeout = "4min";
package = depot.nix.pkgs.heptapod-runner;
};
users.users.gitlab-runner = {
isNormalUser = true;
group = "nogroup";
createHome = true;
home = "/srv/gitlab-runner";
};
nix.gc.automatic = false;
services.factorio = { services.factorio = {
inherit (depot.ops.secrets.factorio) username token; inherit (depot.ops.secrets.factorio) username token;
enable = true; enable = true;

View file

@ -8,6 +8,7 @@
../lib/zfs.nix ../lib/zfs.nix
../lib/bgp.nix ../lib/bgp.nix
../lib/nixbuild-distributed.nix ../lib/nixbuild-distributed.nix
../lib/gitlab-runner-cacher.nix
]; ];
# Otherwise _this_ machine won't enumerate things properly. # Otherwise _this_ machine won't enumerate things properly.

View file

@ -0,0 +1,38 @@
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
{ depot, lib, pkgs, config, ... }:
{
my.vault.secrets.gitlab-runner-environment = {
restartUnits = ["gitlab-runner.service"];
group = "root";
template = ''
{{ with secret "kv/apps/gitlab-runner" }}
{{ .Data.data.environment }}
{{ end }}
'';
};
services.gitlab-runner = {
enable = true;
settings.concurrent = 1;
services = {
deployer = {
registrationConfigFile = config.my.vault.secrets.gitlab-runner-environment.path;
executor = "shell";
tagList = [ "cacher" ];
};
};
gracefulTermination = true;
gracefulTimeout = "4min";
package = depot.nix.pkgs.heptapod-runner;
};
users.users.gitlab-runner = {
isNormalUser = true;
group = "nogroup";
createHome = true;
home = "/srv/gitlab-runner";
};
nix.gc.automatic = false;
}