ops/nixos: add gitlab-runner-cacher, unassign clouvider-lon01, assign cofractal-ams01
This commit is contained in:
parent
bd30c854b3
commit
9d6aa88d2d
3 changed files with 39 additions and 32 deletions
|
@ -256,38 +256,6 @@
|
|||
(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 = {
|
||||
inherit (depot.ops.secrets.factorio) username token;
|
||||
enable = true;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
../lib/zfs.nix
|
||||
../lib/bgp.nix
|
||||
../lib/nixbuild-distributed.nix
|
||||
../lib/gitlab-runner-cacher.nix
|
||||
];
|
||||
|
||||
# Otherwise _this_ machine won't enumerate things properly.
|
||||
|
|
38
ops/nixos/lib/gitlab-runner-cacher.nix
Normal file
38
ops/nixos/lib/gitlab-runner-cacher.nix
Normal 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;
|
||||
}
|
Loading…
Reference in a new issue