From 54dc8286f92edbe3aa7129f5c242e2e68b37602e Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 8 Jul 2026 10:34:14 +0200 Subject: [PATCH] {nixos/channel,make-tarball.nix}: argue for unbounded compression threads --- nixos/lib/make-channel.nix | 3 +++ pkgs/top-level/make-tarball.nix | 3 +++ 2 files changed, 6 insertions(+) diff --git a/nixos/lib/make-channel.nix b/nixos/lib/make-channel.nix index fd2be792b7ac..098be3237dae 100644 --- a/nixos/lib/make-channel.nix +++ b/nixos/lib/make-channel.nix @@ -35,6 +35,9 @@ pkgs.releaseTools.makeSourceTarball { NIX_STATE_DIR=$TMPDIR nix-env -f ../$releaseName/default.nix -qaP --meta --show-trace --xml \* > /dev/null cd .. chmod -R u+w $releaseName + + # The compression tasks are shortlived; use all available CPUs (-T0) to + # prioritize fast channel advancement. XZ_OPT="-T0" tar \ --create \ --file=$out/tarballs/$releaseName.tar.xz \ diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix index 356d519e82c9..eeaea8a32f36 100644 --- a/pkgs/top-level/make-tarball.nix +++ b/pkgs/top-level/make-tarball.nix @@ -64,6 +64,9 @@ pkgs.releaseTools.sourceTarball { # Some context: https://github.com/NixOS/infra/issues/438 distPhase = '' mkdir -p $out/tarballs + + # The compression tasks are shortlived; use all available CPUs (-T0) to + # prioritize fast channel advancement. XZ_OPT="-T0" tar \ --create \ --xz \