about summary refs log tree commit diff
path: root/tools/nixery/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-11-09T14·30+0000
committerVincent Ambo <github@tazj.in>2019-11-09T15·35+0000
commit104c930040ab081f6e24aad95a7df71339d8e6d4 (patch)
tree88805b9fa7bc82bc93ce502e8174b163986794d0 /tools/nixery/default.nix
parent9a8abeff977cfb488073c1f338df0821021d41ab (diff)
chore(build): Use significantly fewer layers for Nixery itself
Nixery itself is built with the buildLayeredImage system, which takes
some time to create large numbers of layers.

This adjusts the default number of image layers from 96 to 20.

Additionally Nixery's image is often loaded with `docker load -i`,
which ignores layer cache hits anyways.

Additionaly the CI build is configured to use only 1, which speeds up
CI runs.
Diffstat (limited to 'tools/nixery/default.nix')
-rw-r--r--tools/nixery/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/nixery/default.nix b/tools/nixery/default.nix
index af1ec904bf25..44ac7313adc7 100644
--- a/tools/nixery/default.nix
+++ b/tools/nixery/default.nix
@@ -14,7 +14,8 @@
 
 { pkgs ? import <nixpkgs> { }
 , preLaunch ? ""
-, extraPackages ? [] }:
+, extraPackages ? []
+, maxLayers ? 20 }:
 
 with pkgs;
 
@@ -92,7 +93,8 @@ in rec {
   in dockerTools.buildLayeredImage {
     name = "nixery";
     config.Cmd = [ "${nixery-launch-script}/bin/nixery" ];
-    maxLayers = 96;
+
+    inherit maxLayers;
     contents = [
       bashInteractive
       cacert