blob: 42c227de30dbbd89db41040a25759aa40a35af53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
{ config, lib, pkgs, ... }:
{
systemd.timers."backup-repositories" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "daily";
Persistent = true;
Unit = "backup-repositories.service";
};
};
systemd.services."backup-repositories" = {
script = ''
mkdir -p $HOME/backups
REPOSITORIES=$(find /home/git/* -name '*.git' -type d)
'';
serviceConfig = {
Type = "oneshot";
User = "git";
};
};
}
|