All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m20s
215 lines
5.1 KiB
Nix
215 lines
5.1 KiB
Nix
{
|
|
osConfig,
|
|
...
|
|
}:
|
|
|
|
{
|
|
programs.nixvim.config = {
|
|
enable = true;
|
|
defaultEditor = true;
|
|
|
|
viAlias = true;
|
|
vimAlias = true;
|
|
|
|
opts = {
|
|
number = true;
|
|
tabstop = 2;
|
|
shiftwidth = 2;
|
|
expandtab = true;
|
|
foldlevel = 99;
|
|
splitbelow = true;
|
|
splitright = true;
|
|
undofile = true;
|
|
updatetime = 100;
|
|
list = true;
|
|
};
|
|
|
|
globals = {
|
|
mapleader = ",";
|
|
maplocalleader = ",";
|
|
};
|
|
|
|
clipboard = {
|
|
register = "unnamedplus";
|
|
|
|
providers.wl-copy.enable = true;
|
|
};
|
|
|
|
plugins.cmp = {
|
|
enable = true;
|
|
autoEnableSources = true;
|
|
settings = {
|
|
sources = [
|
|
{ name = "nvim_lsp"; }
|
|
{ name = "path"; }
|
|
{ name = "buffer"; }
|
|
];
|
|
mapping = {
|
|
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
|
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
|
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
|
};
|
|
};
|
|
};
|
|
|
|
plugins.codecompanion = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
adapters = {
|
|
http.opts.show_defaults = false;
|
|
openwebui.__raw = ''
|
|
function()
|
|
return require("codecompanion.adapters").extend("openai_compatible", {
|
|
name = "openwebui",
|
|
formatted_name = "Open WebUI",
|
|
opts = {
|
|
stream = true,
|
|
tools = true,
|
|
vision = false,
|
|
},
|
|
url = "''${url}''${chat_endpoint}",
|
|
env = {
|
|
api_key = "cmd:cat ${osConfig.age.secrets.open-webui-api-key.path}",
|
|
url = "https://chat.ai.vimium.com",
|
|
chat_endpoint = "/api/chat/completions",
|
|
models_endpoint = "/api/models",
|
|
},
|
|
headers = {
|
|
["Content-Type"] = "application/json",
|
|
Authorization = "Bearer ''${api_key}",
|
|
},
|
|
schema = {
|
|
model = {
|
|
default = "openai/gpt-5-chat",
|
|
},
|
|
},
|
|
})
|
|
end
|
|
'';
|
|
};
|
|
|
|
strategies = {
|
|
chat = {
|
|
adapter = "openwebui";
|
|
};
|
|
inline = {
|
|
adapter = "openwebui";
|
|
};
|
|
cmd = {
|
|
adapter = "openwebui";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
plugins.comment.enable = true;
|
|
|
|
plugins.hmts.enable = true;
|
|
|
|
plugins.lightline.enable = true;
|
|
|
|
plugins.lsp = {
|
|
enable = true;
|
|
servers = {
|
|
bashls.enable = true;
|
|
ccls.enable = true;
|
|
cssls.enable = true;
|
|
eslint.enable = true;
|
|
gopls.enable = true;
|
|
html.enable = true;
|
|
lua_ls.enable = true;
|
|
pylsp.enable = true;
|
|
nixd.enable = true;
|
|
rust_analyzer = {
|
|
enable = true;
|
|
installCargo = true;
|
|
installRustc = true;
|
|
};
|
|
ts_ls.enable = true;
|
|
};
|
|
};
|
|
|
|
plugins.luasnip.enable = true;
|
|
|
|
plugins.nvim-autopairs.enable = true;
|
|
|
|
plugins.telescope = {
|
|
enable = true;
|
|
keymaps = {
|
|
"<leader>ff" = "find_files";
|
|
"<leader>fg" = "live_grep";
|
|
"<leader>b" = "buffers";
|
|
"<leader>fh" = "help_tags";
|
|
"<C-p>" = "git_files";
|
|
"<C-f>" = "live_grep";
|
|
};
|
|
};
|
|
|
|
plugins.treesitter = {
|
|
enable = true;
|
|
|
|
nixvimInjections = true;
|
|
|
|
folding = true;
|
|
settings.indent.enable = true;
|
|
};
|
|
|
|
plugins.treesitter-refactor = {
|
|
enable = true;
|
|
highlightDefinitions = {
|
|
enable = true;
|
|
clearOnCursorMove = false;
|
|
};
|
|
};
|
|
|
|
plugins.undotree.enable = true;
|
|
|
|
plugins.vim-surround.enable = true;
|
|
|
|
plugins.visual-multi.enable = true;
|
|
|
|
plugins.web-devicons.enable = true;
|
|
|
|
plugins.yazi.enable = true;
|
|
|
|
plugins.zen-mode.enable = true;
|
|
|
|
# plugins.actions-preview.enable = true;
|
|
# plugins.aerial.enable = true;
|
|
# plugins.arrow.enable = true;
|
|
# plugins.blink.enable = true;
|
|
# plugins.bufferline.enable = true;
|
|
# plugins.fidget.enable = true;
|
|
# plugins.flash.enable = true;
|
|
# plugins.fugitive.enable = true;
|
|
# plugins.fzf-lua.enable = true;
|
|
# plugins.gitsigns.enable = true;
|
|
# plugins.gitgutter.enable = true;
|
|
# plugins.glance.enable = true;
|
|
# plugins.hop.enable = true;
|
|
# plugins.improved-search.enable = true;
|
|
# plugins.goto-preview.enable = true;
|
|
# plugins.kulala.enable = true;
|
|
# plugins.neo-tree.enable = true;
|
|
# plugins.none-ls.enable = true;
|
|
# plugins.nvim-dap.enable = true;
|
|
# plugins.nvim-dbee.enable = true;
|
|
# plugins.nvim-neoclip.enable = true;
|
|
# plugins.oil.enable = true;
|
|
# plugins.persisted.enable = true;
|
|
# plugins.precognition.enable = true;
|
|
# plugins.project-nvim.enable = true;
|
|
# plugins.tardis.enable = true;
|
|
# plugins.typescript-tools.enable = true;
|
|
};
|
|
|
|
home.sessionVariables.EDITOR = "nvim";
|
|
|
|
home.persistence."/state".directories = [
|
|
".local/share/nvim"
|
|
".local/state/nvim"
|
|
".cache/nvim"
|
|
];
|
|
}
|