alpine: many changes

- updates
- snapserver
- graphana dashboards
- loki
- ddclient
- arr suite, jellyseer
- mautrix fixes
This commit is contained in:
Tristan 2025-01-18 00:18:11 +00:00
parent d1772cb4be
commit 123e7088f5
58 changed files with 2136 additions and 735 deletions

View file

@ -1,30 +0,0 @@
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.o.relativenumber = true
vim.o.number = true
vim.o.signcolumn = 'yes'
vim.o.tabstop = 2
vim.o.shiftwidth = 2
vim.o.expandtab = true
vim.o.smartindent = true
vim.o.scrolloff = 4
vim.o.undofile = true
vim.o.undodir = vim.fn.expand("$HOME/.local/share/nvim/undo")
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
vim.keymap.set("x", "p", "\"_dP")
vim.keymap.set("n", "<leader>y", "\"+y")
vim.keymap.set("v", "<leader>y", "\"+y")
-- Global mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist)
vim.keymap.set('v', '<C-c>', '"+y')
vim.keymap.set('i', '<C-v>', '<escape>"+p')

View file

@ -1,61 +1,20 @@
{pkgs, ...}: {
programs.neovim = {
enable = true;
defaultEditor = true;
extraLuaConfig = ''
${builtins.readFile ./config.lua}
'';
extraPackages = with pkgs; [
nodePackages_latest.typescript-language-server
vscode-langservers-extracted
gopls
nil
rust-analyzer
];
plugins = with pkgs.vimPlugins; [
{
plugin = nvim-surround;
type = "lua";
config = ''
require("nvim-surround").setup()
'';
}
{
plugin = comment-nvim;
type = "lua";
config = ''
require("Comment").setup()
'';
}
{
plugin = vimwiki;
config = ''
let g:vimwiki_list = [{'path': '~/Documents/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}]
'';
}
{
plugin = telescope-nvim;
type = "lua";
config = ''
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
'';
}
{
plugin = nvim-lspconfig;
type = "lua";
config = builtins.readFile ./lspconfig.lua;
}
];
};
{
config,
pkgs,
lib,
...
}: {
programs.nixvim =
{
enable = true;
}
// (import ../../../lib/nixvim.nix {inherit pkgs;});
programs.vscode = {
extensions = [pkgs.vscode-extensions.asvetliakov.vscode-neovim];
userSettings = {
"vscode-neovim.neovimExecutablePaths.linux" = "${pkgs.neovim}/bin/nvim";
"vscode-neovim.neovimExecutablePaths.linux" =
lib.getExe config.programs.nixvim.package;
"extensions.experimental.affinity" = {
"asvetliakov.vscode-neovim" = 1;
};

View file

@ -1,54 +0,0 @@
-- Setup language servers.
local lspconfig = require('lspconfig')
local on_attach = function(client)
require'completion'.on_attach(client)
client.server_capabilities.documentFormattingProvider = false
end
lspconfig.tsserver.setup {
on_attach = on_attach
}
lspconfig.eslint.setup {
on_attach = on_attach
}
lspconfig.rust_analyzer.setup {
on_attach = on_attach
}
lspconfig.gopls.setup {}
lspconfig.nil_ls.setup {}
lspconfig.rust_analyzer.setup {}
-- Use LspAttach autocommand to only map the following keys
-- after the language server attaches to the current buffer
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, opts)
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, opts)
vim.keymap.set('n', '<leader>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<leader>f', function()
vim.lsp.buf.format { async = true }
end, opts)
end,
})