diff --git a/homes/palo/taskwarrior.nix b/homes/palo/taskwarrior.nix index 6603f20..f805be4 100644 --- a/homes/palo/taskwarrior.nix +++ b/homes/palo/taskwarrior.nix @@ -63,8 +63,34 @@ in config = mkIf config.gui.enable { home.file.".config/bugwarrior/bugwarrior.toml".source = (pkgs.formats.toml { }).generate "bugwarriorrc.toml" - config.bugwarrior.config; - home.packages = [ pkgs.bugwarrior ]; + ( + { + general.taskrc = pkgs.writeText "taskrc" "data.location=$HOME/.bugwarrior"; + } + // config.bugwarrior.config + ); + home.packages = [ + pkgs.bugwarrior + #export TASKRC=$HOME/.bugwarrior/${pkgs.writeText "bugwarrior.taskrc" "data.location=$HOME/.bugwarrior"} + (pkgs.writers.writeBashBin "bugwarrior-sync" '' + set -eo pipefail + + mkdir -p $HOME/.bugwarrior + touch $HOME/.bugwarrior/taskrc + + export TASKRC=$HOME/.bugwarrior/taskrc + export TASKDATA=$HOME/.bugwarrior + echo "bugwarrior pull" | ${pkgs.boxes}/bin/boxes -d ansi + ${pkgs.bugwarrior}/bin/bugwarrior pull "$@" + echo "task export" | ${pkgs.boxes}/bin/boxes -d ansi + ${pkgs.taskwarrior}/bin/task export > $HOME/.bugwarrior/bugwarrior.json + + unset TASKRC + unset TASKDATA + echo "task import" | ${pkgs.boxes}/bin/boxes -d ansi + ${taskwarrior}/bin/task import rc.hooks=0 $HOME/.bugwarrior/bugwarrior.json + '') + ]; }; } diff --git a/machines/cherry/configuration.nix b/machines/cherry/configuration.nix index f800a9c..c063fa6 100644 --- a/machines/cherry/configuration.nix +++ b/machines/cherry/configuration.nix @@ -63,10 +63,19 @@ targets = [ "terranix" "my_github" + "logseq" ]; log_level = "INFO"; static_fields = [ "priority" ]; merge_annotations = false; + taskrc = pkgs.writeText "taskrc" '' + data.location=$HOME/.bugwarrior + ''; + }; + logseq = { + service = "logseq"; + add_tags = "bugwarrior,logseq"; + description_template = "{{logseqtitle}}"; }; terranix = { service = "github"; @@ -75,7 +84,7 @@ username = "mrVanDalo"; default_priority = ""; description_template = "{{githubtitle}} {{githuburl}}"; - add_tags = "github"; + add_tags = "bugwarrior,github"; project_template = "terranix"; involved_issues = true; query = "org:terranix is:open"; @@ -88,7 +97,7 @@ token = "@oracle:eval:${pkgs.pass}/bin/pass development/github/mrVanDalo/bugwarriorAccessToken"; username = "mrVanDalo"; description_template = "{{githubtitle}} {{githuburl}}"; - add_tags = "github"; + add_tags = "bugwarrior,github"; include_user_issues = true; include_user_repos = true; exclude_repos = [