Skip to content

Commit

Permalink
taskwarrior: support taskwarrior3 migration
Browse files Browse the repository at this point in the history
Support taskwarrior3 migration, following the approach in [1] to avoid
breaking changes.

[1]: NixOS/nixpkgs#303632

Closes: nix-community#5310
Link: nix-community#5782
  • Loading branch information
trueNAHO authored and rycee committed Sep 7, 2024
1 parent 127ccc3 commit aaebdea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion modules/programs/taskwarrior.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ in {
'';
};

package = mkPackageOption pkgs "taskwarrior" { };
package =
mkPackageOption pkgs "taskwarrior" { example = "pkgs.taskwarrior3"; };
};
};

Expand Down
3 changes: 2 additions & 1 deletion modules/services/taskwarrior-sync.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ in {
options.services.taskwarrior-sync = {
enable = mkEnableOption "Taskwarrior periodic sync";

package = mkPackageOption pkgs "taskwarrior" { };
package =
mkPackageOption pkgs "taskwarrior" { example = "pkgs.taskwarrior3"; };

frequency = mkOption {
type = types.str;
Expand Down
3 changes: 2 additions & 1 deletion tests/modules/programs/taskwarrior/taskwarrior.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ with lib;
config = {
programs.taskwarrior = {
enable = true;
package = pkgs.taskwarrior3;
colorTheme = "dark-violets-256";
dataLocation = "/some/data/location";
config = {
Expand All @@ -18,7 +19,7 @@ with lib;
'';
};

test.stubs.taskwarrior = { };
test.stubs.taskwarrior3 = { };

nmt.script = ''
assertFileExists home-files/.config/task/home-manager-taskrc
Expand Down

0 comments on commit aaebdea

Please sign in to comment.