diff options
Diffstat (limited to 'nix/users/fcuny')
| -rw-r--r-- | nix/users/fcuny/llm.nix | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/nix/users/fcuny/llm.nix b/nix/users/fcuny/llm.nix index 0c6c072..2793373 100644 --- a/nix/users/fcuny/llm.nix +++ b/nix/users/fcuny/llm.nix @@ -1,13 +1,23 @@ -{ self, ... }: { - home.file.".config/llm/templates/pr-prompt.yaml".text = - builtins.readFile "${self}/configs/llm/templates/pr-prompt.yaml"; - - home.file.".config/llm/templates/commit-prompt.yaml".text = - builtins.readFile "${self}/configs/llm/templates/commit-prompt.yaml"; - - home.file.".config/llm/templates/readme-gen.yaml".text = - builtins.readFile "${self}/configs/llm/templates/readme-gen.yaml"; + configPath, + lib, + ... +}: +let + basePath = "llm/templates"; + llmTemplates = [ + "pr-prompt.yaml" + "commit-prompt.yaml" + "readme-gen.yaml" + ]; + mkLlmTemplate = file: { + ".config/${basePath}/${file}" = { + source = "${configPath}/${basePath}/${file}"; + }; + }; +in +{ + home.file = lib.mkMerge (map mkLlmTemplate llmTemplates); programs.fish = { shellAliases = { |
