hydra.nix-community.com is up!

This commit is contained in:
zimbatm 2020-01-12 21:15:32 +01:00
parent f3b0259f69
commit 19581331ed
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
4 changed files with 63 additions and 0 deletions

View file

@ -6,6 +6,7 @@
./buildkite.nix
./gitlab.nix
./hydra.nix
../profiles/common.nix
../profiles/docker.nix

43
build01/hydra.nix Normal file
View file

@ -0,0 +1,43 @@
{ lib, pkgs, config, ... }:
let
sources = import ../nix/sources.nix;
in
{
imports = [ (import sources.simple-hydra) ];
networking.firewall.allowedTCPPorts = [ 80 443 ];
simple-hydra.enable = true;
simple-hydra.hostName = "hydra.nix-community.com";
simple-hydra.useNginx = true;
simple-hydra.localBuilder = {
enable = true;
supportedFeatures = [ "kvm" ];
};
services.hydra = {
enable = true;
useSubstitutes = true;
extraConfig = ''
store_uri = ${config.simple-hydra.store_uri}
max_output_size = ${builtins.toString (8 * 1024 * 1024 * 1024)}
'';
};
nixpkgs.config = {
whitelistedLicenses = with lib.licenses; [
unfreeRedistributable
issl
];
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"cudnn_cudatoolkit"
"cudatoolkit"
];
};
nix = {
extraOptions = ''
allowed-uris = https://github.com/nix-community/ https://github.com/NixOS/
'';
};
}

View file

@ -10,5 +10,17 @@
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs-channels/archive/aa561c6fb4f48974639a9e2b76fdd3e15b2abfd4.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"simple-hydra": {
"branch": "master",
"description": "A simple module for enabling Hydra",
"homepage": null,
"owner": "ElvishJerricco",
"repo": "simple-hydra",
"rev": "0d28b0b66136082d0cbfd90ede4436a580e3e8d0",
"sha256": "0x5x047cb3i5pvic6gb3xid7dkx3sg535rfrrrgiapny3291pkma",
"type": "tarball",
"url": "https://github.com/ElvishJerricco/simple-hydra/archive/0d28b0b66136082d0cbfd90ede4436a580e3e8d0.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

View file

@ -16,6 +16,13 @@ resource "cloudflare_record" "build01-AAAA" {
type = "AAAA"
}
resource "cloudflare_record" "hydra-CNAME" {
zone_id = local.cloudflare_zone_id
name = "hydra"
value = "build01.nix-community.com"
type = "CNAME"
}
resource "cloudflare_record" "apex-A" {
zone_id = local.cloudflare_zone_id
name = "@"