vidr: fix syncing
This commit is contained in:
parent
e9158cf659
commit
58b3643449
|
@ -7,22 +7,22 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
systemd.user.services.vdirsyncer = {
|
systemd.user.services.vdirsyncer = {
|
||||||
Unit = {
|
Unit.Description = "vdirsyncer calendar and contacts synchronization";
|
||||||
Description = "vdirsyncer calendar and contacts synchronization";
|
|
||||||
};
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStartPre = "yes | ${pkgs.vdirsyncer}/bin/vdirsyncer discover";
|
ExecStart = toString (pkgs.writeShellScript "run-vdirsyncer" ''
|
||||||
ExecStart = "${pkgs.vdirsyncer}/bin/vdirsyncer sync";
|
${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer discover
|
||||||
|
${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer sync
|
||||||
|
'');
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.timers.vdirsyncer = {
|
systemd.user.timers.vdirsyncer = {
|
||||||
Unit = { Description = "vdirsyncer calendar and contacts synchronization"; };
|
Unit.Description = "vdirsyncer calendar and contacts synchronization";
|
||||||
Timer = {
|
Timer = {
|
||||||
OnCalendar = "*:0/30";
|
OnCalendar = "*:0/30";
|
||||||
Unit = "vdirsyncer.service";
|
Unit = "vdirsyncer.service";
|
||||||
};
|
};
|
||||||
Install = { WantedBy = [ "timers.target" ]; };
|
Install.WantedBy = [ "timers.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
|
|
Loading…
Reference in a new issue