diff --git a/src/modules/containers.nix b/src/modules/containers.nix index 63a026a50..11d550b2d 100644 --- a/src/modules/containers.nix +++ b/src/modules/containers.nix @@ -33,6 +33,7 @@ let mkDerivation = cfg: nix2container.nix2container.buildImage { name = cfg.name; tag = cfg.version; + maxLayers = cfg.maxLayers; copyToRoot = [ (pkgs.runCommand "create-paths" { } '' mkdir -p $out/tmp @@ -164,6 +165,11 @@ let docker run -it ${config.name}:${config.version} "$@" ''; }; + + maxLayers = lib.mkOption { + type = types.int; + default = 1; + }; }; }); in