aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2018-07-22 08:10:26 -0300
committerEuAndreh <eu@euandre.org>2018-07-22 08:10:26 -0300
commit5b9c014e0fdf326051b548bbd8751a12592b47b4 (patch)
treea053fbaab10b37a0c01eff2ce36a40662b1f675e
parentAdd matrix-client-el (diff)
downloaddotfiles-5b9c014e0fdf326051b548bbd8751a12592b47b4.tar.gz
dotfiles-5b9c014e0fdf326051b548bbd8751a12592b47b4.tar.xz
Use cron for fetching mail instead of systemd
-rw-r--r--nixos/configuration.nix31
1 files changed, 3 insertions, 28 deletions
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index b32122a..49badf8 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -263,6 +263,9 @@
};
services = {
+ cron.enable = true;
+ cron.systemCronJobs = [ "* * * * * andreh mbsync -Va >> /tmp/mbsync.log"];
+
xserver = {
enable = true;
layout = "br";
@@ -372,34 +375,6 @@
};
wantedBy = [ "multi-user.target" ];
};
-
- # Derived from Arch Linux Wiki:
- # https://wiki.archlinux.org/index.php/Isync
- mbsync-service = {
- enable = true;
- description = "Mailbox mbsync synchronization service";
- serviceConfig = {
- Type = "oneshot";
- ExecStart= "${pkgs.isync}/bin/mbsync -Va -c /home/andreh/.mbsyncrc";
- # ExecStartPost = "~andreh/"''
- # for f in $(${pkgs.coreutils}/bin/ls /home/andreh/mbsync/); do
- # ${pkgs.mu}/bin/mu index --maildir ~/mbsync/$f/;
- # done
- # '';
- };
- };
- };
- timers = {
- mbsync-timer = {
- enable = true;
- description = "mbsync service timer";
- timerConfig = {
- OnBootSec = "2m";
- OnUnitActiveSec = "5m";
- Unit = "mbsync-service.service";
- };
- wantedBy = [ "timers.target" ];
- };
};
};