{ config, lib, pkgs, ... }: let inherit (lib) mkIf; cfg = config.my.ai; in { config = mkIf cfg.enable { home-manager.users.moritz.programs.nixvim = { extraPlugins = with pkgs.vimPlugins; [ nui-nvim render-markdown-nvim avante-nvim ]; extraConfigLuaPost = '' require("render-markdown").setup({ file_types = {"markdown", "Avante"} }) require("avante_lib").load() require("avante").setup({ provider = "openai", auto_suggestions_provider = "openai", behaviour = { -- auto_suggestions = true, }, openai = { model = "gpt-4o", api_key_name = "cmd:cat /run/agenix/openai" } }) ''; plugins.dressing.enable = true; }; age.secrets = { "openai".file = ../../../../secrets/openai.age; "openai".owner = "moritz"; anthropic.file = ../../../../secrets/anthropic.age; anthropic.owner = "moritz"; }; }; }