Add gitlab ci
This commit is contained in:
parent
3fda01a546
commit
e7f44a6e98
6 changed files with 33 additions and 0 deletions
|
@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
./buildkite.nix
|
||||
./gitlab.nix
|
||||
|
||||
../profiles/common.nix
|
||||
../profiles/docker.nix
|
||||
|
|
18
build01/gitlab.nix
Normal file
18
build01/gitlab.nix
Normal 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";
|
||||
}
|
|
@ -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.
BIN
secrets/gitlab-runner-registration
Normal file
BIN
secrets/gitlab-runner-registration
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue