aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2018-12-29 06:27:07 -0200
committerEuAndreh <eu@euandre.org>2018-12-29 06:27:07 -0200
commit5fb50dc53a1bfdcda9083d1121709bdfde5d8eb9 (patch)
tree12f642bc92234b4a7313d683ff382e01079ba188
parentAdd cp-todos.sh. (diff)
downloaddotfiles-5fb50dc53a1bfdcda9083d1121709bdfde5d8eb9.tar.gz
dotfiles-5fb50dc53a1bfdcda9083d1121709bdfde5d8eb9.tar.xz
Add cp-todos.sh cronJob.
-rw-r--r--nixos/configuration.nix8
-rwxr-xr-xscripts/cp-todos.sh1
2 files changed, 8 insertions, 1 deletions
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index 36e2cb1..ba0054f 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -311,7 +311,13 @@
services = {
cron.enable = true;
# We can see the actual generated crontab at /etc/crontab
- cron.systemCronJobs = ["0 * * * * andreh /home/andreh/annex/dev/code/dotfiles/scripts/mail.sh -s"];
+ cron.systemCronJobs = [
+ # Sync emails with mbsync every hour
+ "0 * * * * andreh /home/andreh/annex/dev/code/dotfiles/scripts/mail.sh -s"
+
+ # Make read-only copy of TODOs.org every hour
+ "0 * * * * andreh /home/andreh/annex/dev/code/dotfiles/scripts/cp-todos.sh -s"
+ ];
xserver = {
enable = true;
diff --git a/scripts/cp-todos.sh b/scripts/cp-todos.sh
index 4ec8962..5ec5a0f 100755
--- a/scripts/cp-todos.sh
+++ b/scripts/cp-todos.sh
@@ -1 +1,2 @@
cp "$HOME/annex/txt/TODOs.org" "$HOME/Nextcloud/Notes/org.txt"
+cp "$HOME/annex/txt/TODOs.org" "$HOME/Nextcloud/cache/TODOs.org"