aboutsummaryrefslogtreecommitdiffstats
path: root/hm/soispha/conf/taskwarrior
diff options
context:
space:
mode:
Diffstat (limited to 'hm/soispha/conf/taskwarrior')
-rw-r--r--hm/soispha/conf/taskwarrior/default.nix20
-rw-r--r--hm/soispha/conf/taskwarrior/hooks/default.nix4
2 files changed, 18 insertions, 6 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;
};
diff --git a/hm/soispha/conf/taskwarrior/hooks/default.nix b/hm/soispha/conf/taskwarrior/hooks/default.nix
index b1b23f3f..a1393d42 100644
--- a/hm/soispha/conf/taskwarrior/hooks/default.nix
+++ b/hm/soispha/conf/taskwarrior/hooks/default.nix
@@ -12,13 +12,13 @@
mkProject = project: subproject:
if builtins.isString subproject
then {
- name = "${project.name}_${subproject}";
+ name = "${project.name}.${subproject}";
prefix = null;
}
else let
name = builtins.elemAt (builtins.attrNames subproject) 0;
in {
- name = "${project.name}_${name}";
+ name = "${project.name}.${name}";
subprojects = builtins.elemAt (builtins.attrValues subproject) 0;
prefix = null;
};