Moved cron jobs

This commit is contained in:
Craige McWhirter 2020-10-10 14:10:55 +10:00
parent c4c1826050
commit 6d747fc9a3
Signed by: sercanto
GPG key ID: 7DBA9F5689EFB6AA
2 changed files with 17 additions and 9 deletions

View file

@ -7,6 +7,7 @@
imports = [
../hardware/purism_librem_15.nix # Include the results of the hardware scan.
../roles/android.nix # Provide an Android dev environment
../roles/cron-craige.nix # Provide Craige's cron jobs
../roles/daedalus.nix # The open source cryptocurrency wallet for ADA
../roles/desktop-feeds.nix # Tools for news feeds and podcasts
../roles/haskell-dev.nix # Haskel dev environment
@ -143,15 +144,6 @@
GIO_EXTRA_MODULES = [ "${pkgs.gvfs}/lib/gio/modules" ];
};
# Enable cron service
services.cron = {
enable = true;
systemCronJobs = [
"*/5 * * * * root date >> /tmp/cron.log"
"*/5 * * * * craige /run/current-system/sw/bin/task sync >> /home/craige/.tasksync.log 2>&1"
"*/5 * * * * craige /run/current-system/sw/bin/task rc:~/.taskrc_obair sync >> /home/craige/.tasksync_obair.log 2>&1"
];
};
services.acpid.enable = true;
services.blueman.enable = true;
services.kbfs.enable = true;

16
roles/cron-craige.nix Normal file
View file

@ -0,0 +1,16 @@
# NixOps configuration for Craige's cron jobs
{ config, pkgs, ... }:
{
services.cron = {
enable = true; # Enable cron service
systemCronJobs = [
# Taskwarrior syncing
"*/5 * * * * craige /run/current-system/sw/bin/task sync >> /home/craige/.tasksync.log 2>&1"
"*/5 * * * * craige /run/current-system/sw/bin/task rc:~/.taskrc_obair sync >> /home/craige/.tasksync_obair.log 2>&1"
];
};
}