feat: initialize repo with NixOS and Home Manager configs
- Add .gitignore for common languages, tools, and OS/editor artifacts - Configure .gitattributes for Git LFS (fonts, images, archives, ISOs) - Add README with repo description - Add flake.nix defining inputs and outputs for NixOS, Home Manager, and related modules - Introduce home-manager configs: - Base home.nix with packages, services, and programs - Hyprland WM configuration (waybar, fuzzel, keybindings, theming) - Vim (nixvim) setup with LSP and plugins - Zsh setup with aliases, Oh My Zsh, clipboard helpers - Systemd user services (e.g., librespot) - Add scripts (GPU monitor, RAM build helper, install automation) - Add host configurations: - Nixbook (Apple laptop) with hardware, disko, and install script - Nixstation (desktop) with firewall, virtualization, Btrfs scrub timer - Nixtest (test VM) with QEMU + Alpine-based install test harness - Common modules (network, NVIDIA, rclone, screen, keychron, users) - Include statix config for linting
This commit is contained in:
commit
095e9f4f6b
34 changed files with 1954 additions and 0 deletions
99
home-manager/vim.nix
Normal file
99
home-manager/vim.nix
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
ripgrep
|
||||
];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
colorschemes.nord.enable = true;
|
||||
opts = {
|
||||
clipboard = "unnamedplus";
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
shiftwidth = 2;
|
||||
tabstop = 2;
|
||||
expandtab = true;
|
||||
smartindent = true;
|
||||
};
|
||||
|
||||
plugins = {
|
||||
lsp.enable = true;
|
||||
lsp.servers = {
|
||||
lua_ls.enable = true;
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installRustc = true;
|
||||
installCargo = true;
|
||||
};
|
||||
pyright.enable = true;
|
||||
clangd.enable = true;
|
||||
zls.enable = true;
|
||||
nixd.enable = true;
|
||||
};
|
||||
|
||||
cmp.enable = true;
|
||||
cmp-nvim-lsp.enable = true;
|
||||
cmp-buffer.enable = true;
|
||||
cmp-path.enable = true;
|
||||
|
||||
lspkind.enable = true;
|
||||
lsp-lines.enable = true;
|
||||
|
||||
none-ls = {
|
||||
enable = true;
|
||||
sources = {
|
||||
formatting = {
|
||||
stylua.enable = true;
|
||||
shfmt.enable = true;
|
||||
};
|
||||
diagnostics = {
|
||||
# luacheck.enable = true;
|
||||
};
|
||||
code_actions = {
|
||||
statix.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
conform-nvim.enable = true;
|
||||
|
||||
};
|
||||
extraConfigLua = ''
|
||||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
mapping = {
|
||||
['<C-Space>'] = cmp.mapping.complete(), -- trigger manually
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- confirm with Enter
|
||||
['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
},
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
local buf = args.buf
|
||||
local opts = { buffer = buf }
|
||||
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set("n", "<leader>f", function() vim.lsp.buf.format({ async = true }) end, opts)
|
||||
|
||||
vim.keymap.set("n", "<A-j>", ":m .+1<CR>==")
|
||||
vim.keymap.set("n", "<A-k>", ":m .-2<CR>==")
|
||||
end
|
||||
})
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue