Skip to content

Commit

Permalink
build02/nixpkgs-update: remove worker logs older than 3 months
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Feb 12, 2024
1 parent a5d5510 commit 8c8f5bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hosts/build02/nixpkgs-update.nix
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,10 @@ in

systemd.services.nixpkgs-update-delete-old-logs = {
startAt = "weekly";
# delete logs older than 18 months, delete empty directories
# delete logs older than 18 months, delete worker logs older than 3 months, delete empty directories
script = ''
${pkgs.findutils}/bin/find /var/log/nixpkgs-update -type f -mtime +548 -delete
${pkgs.findutils}/bin/find /var/log/nixpkgs-update/~workers -type f -mtime +90 -delete
${pkgs.findutils}/bin/find /var/log/nixpkgs-update -type d -empty -delete
'';
};
Expand Down

0 comments on commit 8c8f5bb

Please sign in to comment.