aboutsummaryrefslogtreecommitdiffstats
path: root/hm/soispha/conf/taskwarrior/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hm/soispha/conf/taskwarrior/default.nix')
-rw-r--r--hm/soispha/conf/taskwarrior/default.nix20
1 files changed, 16 insertions, 4 deletions
diff --git a/hm/soispha/conf/taskwarrior/default.nix b/hm/soispha/conf/taskwarrior/default.nix
index f2ca65a9..c1224ee9 100644
--- a/hm/soispha/conf/taskwarrior/default.nix
+++ b/hm/soispha/conf/taskwarrior/default.nix
@@ -24,9 +24,14 @@
else [
{
inherit (project) name;
- value = {
- read = "project:${project.name}";
- write = "project:${project.name}";
+ value = let
+ name =
+ if builtins.hasAttr "pname" project
+ then project.pname
+ else project.name;
+ in {
+ read = "project:${name}";
+ write = "project:${name}";
rc = {
neorg_path =
if builtins.hasAttr "neorg_path" project
@@ -36,10 +41,16 @@
};
}
];
- mkProject = project: subproject:
+ mkProject = project: subproject: let
+ pname =
+ if builtins.hasAttr "pname" project
+ then project.pname
+ else project.name;
+ in
if builtins.isString subproject
then {
name = "${project.name}_${subproject}";
+ pname = "${pname}.${subproject}";
neorg_path =
if builtins.hasAttr "neorg_path_prefix" project
then "${project.neorg_path_prefix}/${subproject}/index.norg"
@@ -49,6 +60,7 @@
name = builtins.elemAt (builtins.attrNames subproject) 0;
in {
name = "${project.name}_${name}";
+ pname = "${pname}.${name}";
neorg_path_prefix = "${project.prefix}/${project.name}/${name}";
subprojects = builtins.elemAt (builtins.attrValues subproject) 0;
};