From aaebdea769a5c10f1c6e50ebdf5924c1a13f0cda Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Fri, 30 Aug 2024 20:48:07 +0200 Subject: [PATCH] taskwarrior: support taskwarrior3 migration Support taskwarrior3 migration, following the approach in [1] to avoid breaking changes. [1]: https://github.com/NixOS/nixpkgs/pull/303632 Closes: https://github.com/nix-community/home-manager/issues/5310 Link: https://github.com/nix-community/home-manager/pull/5782 --- modules/programs/taskwarrior.nix | 3 ++- modules/services/taskwarrior-sync.nix | 3 ++- tests/modules/programs/taskwarrior/taskwarrior.nix | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/programs/taskwarrior.nix b/modules/programs/taskwarrior.nix index e90b1eb23..9b5af43ee 100644 --- a/modules/programs/taskwarrior.nix +++ b/modules/programs/taskwarrior.nix @@ -85,7 +85,8 @@ in { ''; }; - package = mkPackageOption pkgs "taskwarrior" { }; + package = + mkPackageOption pkgs "taskwarrior" { example = "pkgs.taskwarrior3"; }; }; }; diff --git a/modules/services/taskwarrior-sync.nix b/modules/services/taskwarrior-sync.nix index d3099dd78..3bad924cf 100644 --- a/modules/services/taskwarrior-sync.nix +++ b/modules/services/taskwarrior-sync.nix @@ -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; diff --git a/tests/modules/programs/taskwarrior/taskwarrior.nix b/tests/modules/programs/taskwarrior/taskwarrior.nix index f21198f57..163135a03 100644 --- a/tests/modules/programs/taskwarrior/taskwarrior.nix +++ b/tests/modules/programs/taskwarrior/taskwarrior.nix @@ -6,6 +6,7 @@ with lib; config = { programs.taskwarrior = { enable = true; + package = pkgs.taskwarrior3; colorTheme = "dark-violets-256"; dataLocation = "/some/data/location"; config = { @@ -18,7 +19,7 @@ with lib; ''; }; - test.stubs.taskwarrior = { }; + test.stubs.taskwarrior3 = { }; nmt.script = '' assertFileExists home-files/.config/task/home-manager-taskrc