diff options
author | Soispha <soispha@vhack.eu> | 2024-02-10 19:49:25 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2024-02-10 19:49:25 +0100 |
commit | 7e201c804a67ebdf6ae4931fce5ae5b821551c21 (patch) | |
tree | 3c8bc52089a1819c6d3ef396c66f8aacf7815d46 | |
parent | fix(sys/disks): Differentiate the space limit of '/' an '/tmp' (diff) | |
download | nixos-config-7e201c804a67ebdf6ae4931fce5ae5b821551c21.tar.gz nixos-config-7e201c804a67ebdf6ae4931fce5ae5b821551c21.zip |
fix(hm/conf/taskwarrior): Correctly parse project.nix file
-rw-r--r-- | hm/soispha/conf/taskwarrior/default.nix | 7 |
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)); |