nix/os/devices/CFB4ED74: add gitlab-runner

This commit is contained in:
steveej 2018-11-18 01:08:57 +01:00
parent f7335f8afc
commit 709f323c58
3 changed files with 183 additions and 2 deletions

View file

@ -1,9 +1,13 @@
{ ... }:
{
disabledModules = [
"services/continuous-integration/gitlab-runner.nix"
];
imports = [
../../profiles/common/configuration.nix
../../modules/encryptedDisk.nix
../../modules/gitlab-runner.nix
./system.nix
./hw.nix

View file

@ -1,5 +1,7 @@
{
...
{ config
, pkgs
, lib
, ...
}:
{
@ -9,4 +11,30 @@
enable = true;
openDefaultPorts = true;
};
services.gitlab-runner = {
enable = true;
packages = with pkgs; [
bash
gitlab-runner
nix
gitFull
git-crypt
];
configFile = let
nixRunnerToken = "/etc/secrets/gitlab-runner/nix-runner.token";
in pkgs.writeText "config.toml" ''
concurrent = 2
check_interval = 0
[[runners]]
name = "nix-runner"
url = "https://gitlab.com"
token = "<% sed -z 's/[\n\s]//g' ${nixRunnerToken} %>"
executor = "shell"
shell = "bash"
[runners.cache]
'';
};
}