From b472f55563285ae9ecfa1322530a31a81cc3d42d Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Sun, 8 Sep 2024 12:15:34 +1000 Subject: [PATCH] set a default for hydra-compress-logs service follow up from 99ca560d583239b1bc34485f2f719989642fa697 --- nixos-modules/hydra.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos-modules/hydra.nix b/nixos-modules/hydra.nix index 97906cb34..d001675da 100644 --- a/nixos-modules/hydra.nix +++ b/nixos-modules/hydra.nix @@ -464,10 +464,12 @@ in '' set -eou pipefail compression=$(sed -nr 's/compress_build_logs_compression = ()/\1/p' ${baseDir}/hydra.conf) - if [[ $compression == zstd ]]; then + if [[ $compression == "" ]]; then + compression="bzip2" + elif [[ $compression == zstd ]]; then compression="zstd --rm" fi - find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r $compression --force --quiet + find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r "$compression" --force --quiet ''; startAt = "Sun 01:45"; };