home/git-maintenance: fix units
This commit is contained in:
parent
b82469f51c
commit
9a4f8f5d9d
@ -82,6 +82,8 @@ in
|
||||
fsckObjects = true;
|
||||
};
|
||||
|
||||
maintenance.strategy = "incremental";
|
||||
|
||||
transfer.fsckObjects = true;
|
||||
|
||||
receive.fsckObjects = true;
|
||||
|
@ -1,4 +1,7 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.programs.git;
|
||||
in
|
||||
{
|
||||
systemd.user.services."git-maintenance@" = {
|
||||
Unit = {
|
||||
@ -8,7 +11,11 @@
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${lib.getExe pkgs.git} for-each-repo --config=maintenance.repo maintenance run --schedule=%i";
|
||||
ExecStart = "${lib.getExe pkgs.git} for-each-repo --config=maintenance.repo maintenance run --no-quiet --schedule=%i";
|
||||
|
||||
Environment = [
|
||||
"PATH=${lib.makeBinPath (with pkgs; [ cfg.package openssh ])}"
|
||||
];
|
||||
|
||||
LockPersonality = "yes";
|
||||
MemoryDenyWriteExecute = "yes";
|
||||
@ -27,14 +34,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers."git-maintenance@hourly" = {
|
||||
systemd.user.timers."git-maintenance@" = {
|
||||
Unit = {
|
||||
Description = "Optimize Git repositories data";
|
||||
Documentation = [ "man:git-maintenance(1)" ];
|
||||
};
|
||||
|
||||
Timer = {
|
||||
OnCalendar = "*-*-* 1..23:05:00";
|
||||
Persistent = true;
|
||||
};
|
||||
|
||||
@ -43,35 +49,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers."git-maintenance@daily" = {
|
||||
Unit = {
|
||||
Description = "Optimize Git repositories data";
|
||||
Documentation = [ "man:git-maintenance(1)" ];
|
||||
};
|
||||
|
||||
Timer = {
|
||||
OnCalendar = "Tue..Sun *-*-* 0:05:00";
|
||||
Persistent = true;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers."git-maintenance@weekly" = {
|
||||
Unit = {
|
||||
Description = "Optimize Git repositories data";
|
||||
Documentation = [ "man:git-maintenance(1)" ];
|
||||
};
|
||||
|
||||
Timer = {
|
||||
OnCalendar = "Mon 0:05:00";
|
||||
Persistent = true;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
systemd.user.timers."git-maintenance@hourly".Timer.OnCalendar = "*-*-* 1..23:05:00";
|
||||
systemd.user.timers."git-maintenance@daily".Timer.OnCalendar = "Tue..Sun *-*-* 0:05:00";
|
||||
systemd.user.timers."git-maintenance@weekly".Timer.OnCalendar = "Mon 0:05:00";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user