fix: kitaab sync

This commit is contained in:
Anish L 2022-06-14 23:27:01 +10:00
parent 2f2f9d2c91
commit 438bb4b8a7

View file

@ -5,16 +5,22 @@
serviceConfig.Type = "oneshot";
path = [
pkgs.git
pkgs.coreutils
];
script = ''
${pkgs.coreutils}/bin/cd /home/anish/kitaab/vimwiki
${pkgs.git} commit -am "syncing curve"
${pkgs.git} push
cd /home/anish/kitaab
git add -A
git diff-index --quiet HEAD || git commit -m 'syncing kitaab' # if nothing, don't exit 1
git push
exit 0
'';
serviceConfig = {
User = "anish";
};
};
systemd.timers.kitaab-timer = {
wantedBy = [ "timers.target" ];
partOf = [ "kitaab-sync.service" ];
timerConfig.OnCalendar = [ "*-*-* *:00:00" ];
timerConfig.OnCalendar = [ "daily" ];
};
}