Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions build/hydra.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,23 @@ in
ip saddr $prometheus_inet4 tcp dport { 9198, 9199 } accept
'';

nix.package = config.services.hydra-dev.package.nix;
nix = {
package = config.services.hydra-dev.package.nix;

# garbage collection
nix.gc = {
automatic = true;
options = ''--max-freed "$((400 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
dates = "03,09,15,21:15";
};
settings = {
# gc outputs as well, since they are served from the cache
keep-outputs = lib.mkForce false;

# retry uploads (yes, uploads) harder; defaults to 5 otherwise
download-attempts = 32;
};

# gc outputs as well, since they are served from the cache
nix.settings.keep-outputs = lib.mkForce false;
gc = {
automatic = true;
options = ''--max-freed "$((400 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
dates = "03,09,15,21:15";
};
};

systemd.services.hydra-prune-build-logs = {
description = "Clean up old build logs";
Expand Down