feat: dynamic structure for templates in flake.nix

This commit is contained in:
Leon Schwarzäugl 2024-12-31 17:17:42 +01:00
parent efd667c76a
commit f4f98b248d
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
4 changed files with 95 additions and 59 deletions

View file

@ -78,6 +78,16 @@
})
names);
mkTemplates = names: builtins.listToAttrs (map
(name: {
inherit name;
value = {
path = "${self}/templates/${name}";
description = "${name} project ";
};
})
names);
eachMonitor = _: monitor: {
inherit (monitor) name;
value = builtins.removeAttrs monitor [ "workspace" "name" "output" ];