1
0
Fork 0
nixos-config/home-manager/roles/taskwarrior.nix

58 lines
1.7 KiB
Nix
Raw Normal View History

2019-12-15 12:52:24 +00:00
{ lib, pkgs, config, ... }: {
2020-09-16 21:35:26 +00:00
home.packages = [ pkgs.taskwarrior-git ];
2019-12-15 12:52:24 +00:00
services.taskwarrior-sync = {
enable = true;
frequency = "*:0/1";
};
home.file = {
2020-01-19 18:55:01 +00:00
"add-kassandra-notification" = {
target = ".task/hooks/on-add.kassandra-notification";
executable = true;
text = ''
#!${pkgs.bash}/bin/bash
2020-01-19 19:16:10 +00:00
${pkgs.coreutils}/bin/tee >(${pkgs.netcat}/bin/nc 127.0.0.1 6545)
2020-01-19 18:55:01 +00:00
'';
};
"modify-kassandra-notification" = {
target = ".task/hooks/on-modify.kassandra-notification";
executable = true;
text = ''
#!${pkgs.bash}/bin/bash
2020-01-19 19:16:10 +00:00
${pkgs.coreutils}/bin/tail -n 1 | ${pkgs.coreutils}/bin/tee >(${pkgs.netcat}/bin/nc 127.0.0.1 6545)
2020-01-19 18:55:01 +00:00
'';
};
2020-01-10 19:33:05 +00:00
};
programs.taskwarrior = {
2019-12-15 12:52:24 +00:00
enable = true;
2019-12-16 13:50:31 +00:00
dataLocation = "${config.home.homeDirectory}/.task";
2019-12-15 12:52:24 +00:00
config = {
taskd = {
2020-09-30 23:30:40 +00:00
certificate = pkgs.privatePath "taskwarrior/public.cert";
credentials = pkgs.privateValue "" "taskwarrior/credentials";
ca = pkgs.privatePath "taskwarrior/ca.cert";
key = pkgs.privatePath "taskwarrior/private.key";
2019-12-15 12:52:24 +00:00
server = "hera.m-0.eu:53589";
};
};
extraConfig = ''
alias.inbox=+PENDING -TAGGED limit:1
alias.inboxall=+PENDING -TAGGED
verbose=blank,header,footnote,label,new-id,affected,edit,special,sync
nag=
uda.partof.type=string
uda.partof.label=Parent task
uda.generated.type=string
uda.gen_name.type=string
uda.gen_name.label=Generator name
uda.gen_id.type=string
uda.gen_id.label=Generator id
uda.gen_orphan.type=string
uda.gen_orphan.label=Generated orphan behavior
uda.listposition.type=numeric
'';
};
}