@cryptotaxi247 / infra / commits / e0dc8eb3

Use S3 binary cache

Eelco Dolstra committed May 21, 2020 at 17:06 UTC e0dc8eb35776002d5d6557d5244121b1d2f519cc
2 files changed +10 -6
ngi0/hydra/flake.nix
+1 -1
@@ -1,7 +1,7 @@
1 {
2 edition = 201909;
3
4 - inputs.nixpkgs.uri = "nixpkgs/nixos-20.03";
4 + inputs.nixpkgs.url = "nixpkgs/nixos-20.03";
5
6 outputs = { self, nixpkgs, nix, hydra }: {
7
ngi0/hydra/hydra.nix
+9 -5
@@ -1,5 +1,9 @@
1 { config, pkgs, ... }:
2
3 +let
4 + narCache = "/var/cache/hydra/nar-cache";
5 +in
6 +
7 {
8 services.hydra-dev.enable = true;
9 services.hydra-dev.logo = ./ngi-logo.svg;
@@ -11,9 +15,9 @@
15 ''
16 max_servers 15
17
14 - #store_uri = s3://nix-cache?secret-key=/var/lib/hydra/queue-runner/keys/cache.nixos.org-1/secret&write-nar-listing=1&ls-compression=br&log-compression=br
15 - #server_store_uri = https://cache.nixos.org?local-nar-cache=$ {narCache}
16 - #binary_cache_public_uri = https://cache.nixos.org
18 + store_uri = s3://ngi0-cache?secret-key=/var/lib/hydra/queue-runner/keys/cache.ngi0.nixos.org-1/secret&write-nar-listing=1&ls-compression=br&log-compression=br&region=eu-west-1
19 + server_store_uri = https://cache.ngi0.nixos.org?local-nar-cache=${narCache}
20 + binary_cache_public_uri = https://cache.ngi0.nixos.org
21
22 <Plugin::Session>
23 cache_size = 32m
@@ -28,9 +32,9 @@
32 #upload_logs_to_binary_cache = true
33
34 # FIXME: Cloudfront messes up CORS
31 - #log_prefix = https://cache.nixos.org/
35 + #log_prefix = https://cache.ngi0.nixos.org/
36
33 - #log_prefix = https://nix-cache.s3.amazonaws.com/
37 + log_prefix = https://ngi0-cache.s3.eu-west-1.amazonaws.com/
38
39 evaluator_workers = 4
40 evaluator_max_memory_size = 4096