aboutsummaryrefslogtreecommitdiff
path: root/home/profiles/llm.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/profiles/llm.nix')
-rw-r--r--home/profiles/llm.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/home/profiles/llm.nix b/home/profiles/llm.nix
new file mode 100644
index 0000000..2793373
--- /dev/null
+++ b/home/profiles/llm.nix
@@ -0,0 +1,33 @@
+{
+ 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 = {
+ commit-msg = "git diff --cached | llm -t commit-prompt";
+ pr-msg = "git diff HEAD | llm -t pr-prompt";
+ readme-gen = "llm -t readme-gen";
+ };
+ };
+
+ home.sessionVariables = {
+ LLM_USER_PATH = "$HOME/.config/llm";
+ };
+}