From 7aff15e8c4fd3f304d82979a49aa47e9780a105b Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Thu, 13 Jun 2024 21:11:40 -0700 Subject: [PATCH] nixos/systemd-repart: respect NIX_BUILD_CORES for image compression --- nixos/modules/image/repart-image.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/image/repart-image.nix b/nixos/modules/image/repart-image.nix index e40406729900..de03beeafc0b 100644 --- a/nixos/modules/image/repart-image.nix +++ b/nixos/modules/image/repart-image.nix @@ -90,8 +90,8 @@ let }."${compression.algorithm}"; compressionCommand = { - "zstd" = "zstd --no-progress --threads=0 -${toString compression.level}"; - "xz" = "xz --keep --verbose --threads=0 -${toString compression.level}"; + "zstd" = "zstd --no-progress --threads=$NIX_BUILD_CORES -${toString compression.level}"; + "xz" = "xz --keep --verbose --threads=$NIX_BUILD_CORES -${toString compression.level}"; }."${compression.algorithm}"; in stdenvNoCC.mkDerivation (finalAttrs: