From 35e980a65ad049d57e85ca8c065c5a53d50bbb5e Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 12 Mar 2020 19:09:52 +0800 Subject: [PATCH] taskwarrior: improved setup and calendar --- modules/programs/shell-bash.nix | 2 -- modules/programs/shell-zsh.nix | 2 -- modules/programs/taskwarrior.nix | 27 ++++++++++++++++++--------- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/modules/programs/shell-bash.nix b/modules/programs/shell-bash.nix index a0e9f3c..0c1bd0e 100644 --- a/modules/programs/shell-bash.nix +++ b/modules/programs/shell-bash.nix @@ -65,8 +65,6 @@ in { lt = "ls -lct --reverse"; less = "less -S"; top = "htop"; - todo = "task todo"; - active = "task active"; version = "date '+%Y%m%d%H%M%S'"; vclip = "xclip -selection clipboard"; df = "df -h"; diff --git a/modules/programs/shell-zsh.nix b/modules/programs/shell-zsh.nix index 97a77f6..ed8395a 100644 --- a/modules/programs/shell-zsh.nix +++ b/modules/programs/shell-zsh.nix @@ -63,8 +63,6 @@ in { lt = "ls -lct --reverse"; less = "less -S"; top = "htop"; - todo = "task todo"; - active = "task active"; version = "date '+%Y%m%d%H%M%S'"; vclip = "xclip -selection clipboard"; df = "df -h"; diff --git a/modules/programs/taskwarrior.nix b/modules/programs/taskwarrior.nix index 50ae1ab..ec66f91 100644 --- a/modules/programs/taskwarrior.nix +++ b/modules/programs/taskwarrior.nix @@ -21,6 +21,16 @@ let ${pkgs.taskwarrior}/bin/task "$@" ''; + vit = unstable.vit.overrideAttrs (old: rec { + name = "vit-${version}"; + version = "master"; + src = pkgs.fetchgit { + url = "https://github.com/scottkosty/vit.git"; + rev = "7200949214362139e8073b6ca1a58cc756b2ebd0"; + sha256 = "1s0rvqn8xjy3qiw9034wfzz2r7mwary70x32fqprz2w2h5r73j2m"; + }; + }); + in { options.programs.custom.taskwarrior.enable = @@ -29,22 +39,21 @@ in { config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ + taskwarrior timewarrior tasksh taskNextWeek tsak - (unstable.vit.overrideAttrs (old: rec { - name = "vit-${version}"; - version = "master"; - src = pkgs.fetchgit { - url = "https://github.com/scottkosty/vit.git"; - rev = "7200949214362139e8073b6ca1a58cc756b2ebd0"; - sha256 = "1s0rvqn8xjy3qiw9034wfzz2r7mwary70x32fqprz2w2h5r73j2m"; - }; + (pkgs.writers.writeBashBin "calendar" '' + ${pkgs.taskwarrior}/bin/task calendar + ${pkgs.taskwarrior}/bin/task calendar_report + '') - })) + vit + (pkgs.writers.writeBashBin "active" "${vit}/bin/vit active") + (pkgs.writers.writeBashBin "todo" "${vit}/bin/vit todo") taskwarrior-hooks vdirsyncer