diff --git a/hydra-module.nix b/hydra-module.nix index c4732990..a8b9fb6c 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -93,7 +93,7 @@ in type = types.int; default = 0; description = '' - Threshold of minimum disk space (GiB) to determine if queue runner should run or not. + Threshold of minimum disk space (GiB) to determine if the queue runner should run or not. ''; }; @@ -101,7 +101,7 @@ in type = types.int; default = 0; description = '' - Threshold of minimum disk space (GiB) to determine if evaluator should run or not. + Threshold of minimum disk space (GiB) to determine if the evaluator should run or not. ''; }; @@ -323,6 +323,18 @@ in startAt = "*:0/5"; }; + # Periodically compress build logs. The queue runner compresses + # logs automatically after a step finishes, but this doesn't work + # if the queue runner is stopped prematurely. + systemd.services.hydra-compress-logs = + { path = [ pkgs.bzip2 ]; + script = + '' + find /var/lib/hydra/build-logs -type f -name "*.drv" -mtime +3 -size +0c | xargs -r bzip2 -v + ''; + startAt = "Sun 01:45"; + }; + services.postgresql.enable = mkIf haveLocalDB true; services.postgresql.identMap = optionalString haveLocalDB