2024-10-24 20:32:29 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
2024-09-15 15:31:39 +02:00
|
|
|
|
|
|
|
let
|
2024-10-24 20:32:29 +02:00
|
|
|
inherit (lib) mkIf;
|
|
|
|
|
|
|
|
cfg = config.my.ai;
|
2024-09-15 15:31:39 +02:00
|
|
|
in
|
|
|
|
{
|
2024-10-24 20:32:29 +02:00
|
|
|
config = mkIf cfg.enable {
|
2024-12-14 22:53:05 +01:00
|
|
|
home-manager.users.moritz.programs.nixvim.plugins = {
|
|
|
|
render-markdown = {
|
|
|
|
enable = true;
|
|
|
|
settings.file_types = [ "markdown" "Avante" ];
|
|
|
|
};
|
|
|
|
nui.enable = true;
|
|
|
|
dressing.enable = true;
|
|
|
|
avante = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
provider = "openai";
|
2024-10-24 20:32:29 +02:00
|
|
|
openai = {
|
2024-12-14 22:53:05 +01:00
|
|
|
model = "gpt-4o";
|
|
|
|
api_key_name = "cmd:cat /run/agenix/openai";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-10-24 20:32:29 +02:00
|
|
|
};
|
|
|
|
age.secrets = {
|
|
|
|
"openai".file = ../../../../secrets/openai.age;
|
|
|
|
"openai".owner = "moritz";
|
|
|
|
anthropic.file = ../../../../secrets/anthropic.age;
|
|
|
|
anthropic.owner = "moritz";
|
|
|
|
};
|
2024-09-15 15:31:39 +02:00
|
|
|
};
|
|
|
|
}
|