dotfiles/modules/programs/nvim/new_plugins/avante.nix

36 lines
791 B
Nix
Raw Normal View History

2024-10-24 20:32:29 +02:00
{ config, lib, pkgs, ... }:
let
2024-10-24 20:32:29 +02:00
inherit (lib) mkIf;
cfg = config.my.ai;
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";
};
};
}