nix/os/devices/CFB4ED74: add gitlab-runner
This commit is contained in:
parent
f7335f8afc
commit
709f323c58
3 changed files with 183 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue