1
0
Fork 0

Add auto task updates

This commit is contained in:
Malte Brandy 2018-06-20 01:50:38 +02:00
parent 2a8a751452
commit 7358c87e23
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9
3 changed files with 29 additions and 0 deletions

View file

@ -21,6 +21,7 @@ imports = [
./modules/eventd.nix
./modules/unlock.nix
./modules/weechat
./modules/update_tasks.nix
../common
# ./sort-mail.nix
# ./morgenreport.nix

View file

@ -0,0 +1,27 @@
{ config, lib, pkgs , ... }:
with lib;
let
in {
options.m-0.update_tasks.enable = mkEnableOption "Update Tasks";
config = mkIf config.m-0.update_tasks.enable {
systemd.user = {
services.update_tasks = {
Unit = {
Description = "Update Tasks";
};
Service = {
Type = "oneshot";
Environment="PATH=${pkgs.taskwarrior}/bin:${pkgs.eventd}/bin";
ExecStart="${pkgs.rust_scripts}/bin/update_tasks";
};
};
timers.update_tasks = {
Timer = {
OnCalendar = "hourly";
};
};
};
};
}

View file

@ -13,6 +13,7 @@ m-0.accounting.enable = true;
m-0.graphical.enable = true;
m-0.rustdev.enable = true;
m-0.taskwarrior.enable = true;
m-0.update_tasks.enable = true;
m-0.eventd.enable = true;
m-0.unlocker = [ {
name = "hera";