about summary refs log tree commit diff stats
path: root/modules/by-name/ta/taskwarrior
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/by-name/ta/taskwarrior/module.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/by-name/ta/taskwarrior/module.nix b/modules/by-name/ta/taskwarrior/module.nix
index 4c174244..bb881768 100644
--- a/modules/by-name/ta/taskwarrior/module.nix
+++ b/modules/by-name/ta/taskwarrior/module.nix
@@ -76,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";
@@ -108,17 +110,17 @@ in {
       inherit mkHook;
     };
 
-    age.secrets.taskwarrior_sync_server_encryption_key = lib.mkIf cfg.enable {
+    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 config.age.secrets.taskwarrior_sync_server_encryption_key.path;
+    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;
       };
@@ -148,7 +150,7 @@ in {
             };
           };
 
-          sync.server = {
+          sync.server = lib.mkIf cfg.enableAge {
             client_id = "a3619d43-031f-4f85-848f-5512804f9a1d";
             url = "https://taskchampion.vhack.eu";
           };