about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--hm/soispha/conf/taskwarrior/default.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/hm/soispha/conf/taskwarrior/default.nix b/hm/soispha/conf/taskwarrior/default.nix
index 4487e360..3bd7c03d 100644
--- a/hm/soispha/conf/taskwarrior/default.nix
+++ b/hm/soispha/conf/taskwarrior/default.nix
@@ -57,14 +57,17 @@
           then "${project.neorg_path_prefix}/${subproject}/index.norg"
           else "${project.prefix}/${project.name}/${subproject}/index.norg";
       }
-      else let
+      else if builtins.isAttrs subproject
+      then let
         name = builtins.elemAt (builtins.attrNames subproject) 0;
       in {
         name = "${project.name}_${name}";
         pname = "${pname}.${name}";
+        prefix = "${project.prefix}/${project.name}";
         neorg_path_prefix = "${project.prefix}/${project.name}/${name}";
         subprojects = builtins.elemAt (builtins.attrValues subproject) 0;
-      };
+      }
+      else builtins.throw "Subproject not a string or a attrs: ${subproject}";
 
     context =
       builtins.listToAttrs (lib.lists.flatten (builtins.map mkContext projects));