make kitaab update a user unit, use user path
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
../profiles/core
|
||||
../profiles/bluetooth
|
||||
../profiles/music
|
||||
../profiles/sync/kitaab
|
||||
../profiles/sync/cal
|
||||
../profiles/wifi
|
||||
../profiles/desktop
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
systemd.services.kitaab-sync = {
|
||||
serviceConfig.Type = "oneshot";
|
||||
path = [
|
||||
pkgs.git
|
||||
pkgs.openssh
|
||||
pkgs.coreutils
|
||||
];
|
||||
script = ''
|
||||
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-sync = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
partOf = [ "kitaab-sync.service" ];
|
||||
timerConfig.OnCalendar = [ "hourly" ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user