From 7e201c804a67ebdf6ae4931fce5ae5b821551c21 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 10 Feb 2024 19:49:25 +0100 Subject: fix(hm/conf/taskwarrior): Correctly parse project.nix file --- hm/soispha/conf/taskwarrior/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'hm/soispha/conf') 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)); -- cgit 1.4.1