aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nixos/configuration.nix2
-rwxr-xr-xscripts/mail.sh6
2 files changed, 6 insertions, 2 deletions
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index d754f7b..8db07ea 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -298,7 +298,7 @@
services = {
cron.enable = true;
# We can see the actual generated crontab at /etc/crontab
- cron.systemCronJobs = ["* * * * * andreh /home/andreh/annex/dev/code/dotfiles/scripts/mail.sh"];
+ cron.systemCronJobs = ["0 * * * * andreh /home/andreh/annex/dev/code/dotfiles/scripts/mail.sh -s"];
xserver = {
enable = true;
diff --git a/scripts/mail.sh b/scripts/mail.sh
index e9f14d8..c8f6522 100755
--- a/scripts/mail.sh
+++ b/scripts/mail.sh
@@ -1 +1,5 @@
-mbsync -aV &>> /tmp/mbsync.log && notmuch new &>> /tmp/notmuch.log
+if [ "$1" = "-s" ]; then
+ mbsync -a &>> /tmp/mbsync.log && notmuch new &>> /tmp/notmuch.log
+else
+ mbsync -aV && notmuch new
+fi