nixos-dots

nixos dots
git clone git://popovic.xyz/nixos-dots.git
Log | Files | Refs

mbsync_timer.nix (833B)


      1 { pkgs , ... }:
      2 {
      3   systemd.user = {
      4     startServices = "sd-switch";
      5     services.mbsync = {
      6       Unit = {
      7         Description = "Mailbox sync service";
      8         RefuseManualStart = "no";
      9         RefuseManualStop = "yes";
     10       };
     11       Service = {
     12         Type = "oneshot";
     13         ExecStart = "${pkgs.zsh}/bin/zsh -c 'mbsync -c .config/isync/mbsyncrc -a -q'";
     14       };
     15       Install = {
     16         wantedBy = [ "default.target" ];
     17       };
     18     };
     19     timers.mbsync = {
     20       Unit = {
     21         Description = "Mailbox sync timer";
     22         RefuseManualStop = "no";
     23         RefuseManualStart = "no";
     24       };
     25       Timer = {
     26         Persistent = false;
     27         OnBootSec = "0.3m";
     28         OnUnitActiveSec = "0.5m";
     29         Unit = "mbsync.service";
     30       };
     31       Install = {
     32         WantedBy = [ "timers.target" ];
     33       };
     34     };
     35   };
     36 }