summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lass@blue.r>2018-07-10 21:07:56 +0200
committerlassulus <lass@blue.r>2018-07-10 21:07:56 +0200
commit3c8678eb25fe4a143d92a983d3d3c4b537e31f31 (patch)
tree9d110e02d94ec47170db008a558bc84ce5fcd0c7
parent2f29f28730347c2b69d3aebc931deb36159cf1fe (diff)
parent9f9cd592c50911e49956cf47e8e385a8299ac410 (diff)
Merge remote-tracking branch 'prism/staging/jeschli'
-rw-r--r--krebs/2configs/reaktor-krebs.nix4
-rw-r--r--krebs/5pkgs/simple/Reaktor/plugins.nix32
2 files changed, 25 insertions, 11 deletions
diff --git a/krebs/2configs/reaktor-krebs.nix b/krebs/2configs/reaktor-krebs.nix
index d80fd0eb1..2e63f1385 100644
--- a/krebs/2configs/reaktor-krebs.nix
+++ b/krebs/2configs/reaktor-krebs.nix
@@ -13,7 +13,9 @@ with import <stockholm/lib>;
};
plugins = with pkgs.ReaktorPlugins; [
sed-plugin
- taskwarrior
+ task-add
+ task-delete
+ task-list
] ++
(attrValues (todo "agenda"))
;
diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix
index c303f9fb3..db578c457 100644
--- a/krebs/5pkgs/simple/Reaktor/plugins.nix
+++ b/krebs/5pkgs/simple/Reaktor/plugins.nix
@@ -146,16 +146,28 @@ rec {
'';
});
- taskwarrior = buildSimpleReaktorPlugin "task" {
- pattern = "^task: (?P<args>.*)$$";
- script = let
- taskrc = "$HOME/.taskrc";
- in
- pkgs.writeDash "task-wrapper" ''
- if [ -f ${taskrc} ] ; then
- touch ${taskrc}
- fi
- ${pkgs.taskwarrior}/bin/task "$*"
+ taskrcFile = builtins.toFile "taskrc" ''
+ confirmation=no
+ '';
+
+ task-add = buildSimpleReaktorPlugin "task-add" {
+ pattern = "^task-add: (?P<args>.*)$$";
+ script = pkgs.writeDash "task-add" ''
+ ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} add "$*"
+ '';
+ };
+
+ task-list = buildSimpleReaktorPlugin "task-list" {
+ pattern = "^task-list";
+ script = pkgs.writeDash "task-list" ''
+ ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} list
+ '';
+ };
+
+ task-delete = buildSimpleReaktorPlugin "task-delete" {
+ pattern = "^task-remove: (?P<args>.*)$$";
+ script = pkgs.writeDash "task-delete" ''
+ ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} delete "$*"
'';
};