fix: kitaab sync
This commit is contained in:
parent
2f2f9d2c91
commit
438bb4b8a7
|
@ -5,16 +5,22 @@
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
path = [
|
path = [
|
||||||
pkgs.git
|
pkgs.git
|
||||||
|
pkgs.coreutils
|
||||||
];
|
];
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.coreutils}/bin/cd /home/anish/kitaab/vimwiki
|
cd /home/anish/kitaab
|
||||||
${pkgs.git} commit -am "syncing curve"
|
git add -A
|
||||||
${pkgs.git} push
|
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 = {
|
systemd.timers.kitaab-timer = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
partOf = [ "kitaab-sync.service" ];
|
partOf = [ "kitaab-sync.service" ];
|
||||||
timerConfig.OnCalendar = [ "*-*-* *:00:00" ];
|
timerConfig.OnCalendar = [ "daily" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue