From 4a441b54ce9ad1722a5ae27664664c9921b83868 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Fri, 28 Jan 2022 12:59:11 -0800 Subject: [PATCH] hydra-module: /var/lib/hydra -> ${baseDir} --- hydra-module.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hydra-module.nix b/hydra-module.nix index e3d7e614..c950f872 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -436,12 +436,12 @@ in if [ $(systemctl is-active $service) == active ]; then echo "stopping $service due to lack of free space..." systemctl stop $service - date > /var/lib/hydra/.$service-stopped-minspace + date > ${baseDir}/.$service-stopped-minspace fi else if [ $spaceleft -gt $(( ($minFreeGB + 10) * 1024**3)) -a \ - -r /var/lib/hydra/.$service-stopped-minspace ] ; then - rm /var/lib/hydra/.$service-stopped-minspace + -r ${baseDir}/.$service-stopped-minspace ] ; then + rm ${baseDir}/.$service-stopped-minspace echo "restarting $service due to newly available free space..." systemctl start $service fi @@ -460,8 +460,8 @@ in { path = [ pkgs.bzip2 ]; script = '' - find /var/lib/hydra/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v -f - find /var/lib/hydra/runcommand-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v -f + find ${baseDir}/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v -f + find ${baseDir}/runcommand-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v -f ''; startAt = "Sun 01:45"; };