Garbage collect git repositories monthly
This commit is contained in:
parent
2591de7f3d
commit
e0c794dfdb
|
@ -77,4 +77,15 @@ in {
|
||||||
};
|
};
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Garbage collect git repositories on a monthly basis
|
||||||
|
systemd.user.services.git-gc = {
|
||||||
|
description = "Garbage collect git repositories";
|
||||||
|
path = [ git fd ];
|
||||||
|
script = ''
|
||||||
|
${pkgs.fd}/bin/fd -g -H --type directory '.git' /home/coolneng --exec git -C '{}' gc --aggressive
|
||||||
|
'';
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
startAt = "*-*-13 17:00:00";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue