about summary refs log tree commit diff stats
path: root/modules/by-name/ta/taskwarrior/module.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/by-name/ta/taskwarrior/module.nix29
1 files changed, 28 insertions, 1 deletions
diff --git a/modules/by-name/ta/taskwarrior/module.nix b/modules/by-name/ta/taskwarrior/module.nix
index c5549ac9..bb881768 100644
--- a/modules/by-name/ta/taskwarrior/module.nix
+++ b/modules/by-name/ta/taskwarrior/module.nix
@@ -1,3 +1,12 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
   lib,
   config,
@@ -67,6 +76,8 @@ in {
   options.soispha.programs.taskwarrior = {
     enable = lib.mkEnableOption "taskwarrior";
 
+    enableAge = lib.mkEnableOption "taskwarrior with age keys";
+
     includeFiles = lib.mkOption {
       type = lib.types.attrsOf lib.types.path;
       description = "Extra files to include in the taskwarrior config";
@@ -99,8 +110,17 @@ in {
       inherit mkHook;
     };
 
+    age.secrets.taskwarrior_sync_server_encryption_key = lib.mkIf (cfg.enable && cfg.enableAge) {
+      file = ./secrets/sync_server_encryption_key.age;
+      mode = "700";
+      owner = "soispha";
+      group = "users";
+    };
+
+    soispha.programs.taskwarrior.includeFiles.syncServerSecret = lib.mkIf (cfg.enable && cfg.enableAge) config.age.secrets.taskwarrior_sync_server_encryption_key.path;
+
     home-manager.users.soispha = lib.mkIf cfg.enable {
-      services.taskwarrior-sync = {
+      services.taskwarrior-sync = lib.mkIf cfg.enableAge {
         enable = true;
         package = pkgs.taskwarrior3;
       };
@@ -118,6 +138,8 @@ in {
             tags = true;
           };
 
+          news.version = "3.4.1";
+
           regex = true;
           weekstart = "Monday";
 
@@ -128,6 +150,11 @@ in {
             };
           };
 
+          sync.server = lib.mkIf cfg.enableAge {
+            client_id = "a3619d43-031f-4f85-848f-5512804f9a1d";
+            url = "https://taskchampion.vhack.eu";
+          };
+
           alias = {
             mod = "modify";
           };