Add gitlab ci

This commit is contained in:
adisbladis 2019-11-01 17:15:45 +00:00
parent 3fda01a546
commit e7f44a6e98
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7
6 changed files with 33 additions and 0 deletions

View file

@ -6,5 +6,12 @@
tokenPath = "/run/keys/buildkite-token";
openssh.privateKeyPath = builtins.toPath "/run/keys/buildkite-agent-key";
openssh.publicKeyPath = builtins.toPath "/run/keys/buildkite-agent-key-pub";
runtimePackages = [
pkgs.gnutar
pkgs.bash
pkgs.nix
pkgs.gzip
];
};
}

View file

@ -3,7 +3,9 @@
{
imports = [
./hardware-configuration.nix
./buildkite.nix
./gitlab.nix
../profiles/common.nix
../profiles/docker.nix

18
build01/gitlab.nix Normal file
View file

@ -0,0 +1,18 @@
{ pkgs, ... }:
let
gitlabModule = pkgs.fetchFromGitLab {
owner = "arianvp";
repo = "nixos-gitlab-runner";
rev = "9126927c701aa399bd1734e7e5230c3a0010c1b7";
sha256 = "1s0fy5ny2ygcfvx35xws8xz5ih4z4kdfqlq3r6byxpylw7r52fyi";
};
in {
imports = [
"${gitlabModule}/gitlab-runner.nix"
];
services.gitlab-runner2.enable = true;
services.gitlab-runner2.registrationConfigFile = "/run/keys/gitlab-runner-registration";
}

View file

@ -33,6 +33,12 @@ in {
permissions = "0600";
};
deployment.keys.gitlab-runner-registration = {
text = secrets.gitlab-runner-registration;
user = "gitlab-runner";
permissions = "0600";
};
};
}

Binary file not shown.

Binary file not shown.