aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configs/users/fcuny/llm/templates/commit-prompt.yaml (renamed from configs/llm/templates/commit-prompt.yaml)0
-rw-r--r--configs/users/fcuny/llm/templates/pr-prompt.yaml (renamed from configs/llm/templates/pr-prompt.yaml)0
-rw-r--r--configs/users/fcuny/llm/templates/readme-gen.yaml (renamed from configs/llm/templates/readme-gen.yaml)0
-rw-r--r--nix/lib/mkSystem.nix1
-rw-r--r--nix/users/fcuny/llm.nix28
5 files changed, 20 insertions, 9 deletions
diff --git a/configs/llm/templates/commit-prompt.yaml b/configs/users/fcuny/llm/templates/commit-prompt.yaml
index f9a2752..f9a2752 100644
--- a/configs/llm/templates/commit-prompt.yaml
+++ b/configs/users/fcuny/llm/templates/commit-prompt.yaml
diff --git a/configs/llm/templates/pr-prompt.yaml b/configs/users/fcuny/llm/templates/pr-prompt.yaml
index 53671ba..53671ba 100644
--- a/configs/llm/templates/pr-prompt.yaml
+++ b/configs/users/fcuny/llm/templates/pr-prompt.yaml
diff --git a/configs/llm/templates/readme-gen.yaml b/configs/users/fcuny/llm/templates/readme-gen.yaml
index 585aaf2..585aaf2 100644
--- a/configs/llm/templates/readme-gen.yaml
+++ b/configs/users/fcuny/llm/templates/readme-gen.yaml
diff --git a/nix/lib/mkSystem.nix b/nix/lib/mkSystem.nix
index 3241dd9..94d1b35 100644
--- a/nix/lib/mkSystem.nix
+++ b/nix/lib/mkSystem.nix
@@ -54,6 +54,7 @@ systemFunc rec {
};
home-manager.extraSpecialArgs = {
inherit self inputs;
+ configPath = "${self}/configs/users/${user}";
};
}
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 = {