feat(gerrit): run git-gc-preserve on a daily timer

This commit is contained in:
Janik Haag 2024-09-16 19:26:30 +02:00
parent 94d1881e10
commit 09af4dfb7c
No known key found for this signature in database

View file

@ -318,6 +318,25 @@ in
environment.REVWALK_USE_PRIORITY_QUEUE = "true";
};
systemd.timers.gerrit-garbage-collect = {
wantedBy = [ "timers.target" ];
after = [ "multi-user.target" ];
timerConfig = {
OnCalendar = "daily";
};
};
systemd.services.gerrit-garbage-collect = {
serviceConfig = {
WorkingDirectory = "/var/lib/gerrit/git";
Type = "oneshot";
User = "git";
Group = "git";
};
script = ''
${lib.getExe pkgs.git-gc-preserve}
'';
};
age.secrets.gerrit-prometheus-bearer-token.file = ../../secrets/gerrit-prometheus-bearer-token.age;
bagel.monitoring.grafana-agent.exporters.gerrit = {
port = 4778; # grrt