wolf.r: add declarative gitlab-runner

This commit is contained in:
makefu 2019-06-12 09:56:07 +02:00
parent 08ddffd781
commit 4caeb3d3f8
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225
2 changed files with 22 additions and 0 deletions

View File

@ -26,6 +26,7 @@ in
<stockholm/krebs/2configs/shack/radioactive.nix>
<stockholm/krebs/2configs/shack/share.nix>
<stockholm/krebs/2configs/shack/mobile.mpd.nix>
<stockholm/krebs/2configs/shack/gitlab-runner.nix>
{
systemd.services.telegraf.path = [ pkgs.net_snmp ]; # for snmptranslate
systemd.services.telegraf.environment = {

View File

@ -0,0 +1,21 @@
{ pkgs, ... }:
let
runner-src = builtins.fetchTarball {
url = "https://gitlab.com/arianvp/nixos-gitlab-runner/-/archive/master/nixos-gitlab-runner-master.tar.gz";
sha256 = "1s0fy5ny2ygcfvx35xws8xz5ih4z4kdfqlq3r6byxpylw7r52fyi";
};
in
{
systemd.services.gitlab-runner.path = [
"/run/wrappers" # /run/wrappers/bin/su
"/" # /bin/sh
];
imports = [
"${runner-src}/gitlab-runner.nix"
];
services.gitlab-runner2.enable = true;
## registrationConfigurationFile contains:
# CI_SERVER_URL=<CI server URL>
# REGISTRATION_TOKEN=<registration secret>
services.gitlab-runner2.registrationConfigFile = <secrets/shackspace-gitlab-ci>;
}