A bleeding edge Nix flake for LazyVim that automatically tracks LazyVim releases and provides zero-configuration setup for NixOS and home-manager users.
π Always up-to-date: Automatically tracks LazyVim releases and uses the latest plugin versions at the time of each LazyVim release.
Add to your flake inputs:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
lazyvim.url = "github:pfassina/lazyvim-nix";
};
outputs = { nixpkgs, home-manager, lazyvim, ... }: {
# Your system configuration
};
}Enable in your home-manager configuration:
{
imports = [ lazyvim.homeManagerModules.default ];
programs.lazyvim.enable = true;
}That's it! Open nvim and enjoy LazyVim.
Pin to a specific LazyVim release:
lazyvim.url = "github:pfassina/lazyvim-nix/v15.13.0"; # Pin to v15.13.0programs.lazyvim = {
enable = true;
extras = {
lang.nix.enable = true;
lang.python = {
enable = true;
installDependencies = true; # Install ruff
installRuntimeDependencies = true; # Install python3
};
lang.go = {
enable = true;
installDependencies = true; # Install gopls, gofumpt, etc.
installRuntimeDependencies = true; # Install go compiler
};
};
# Additional packages (optional)
extraPackages = with pkgs; [
nixd # Nix LSP
alejandra # Nix formatter
];
# Only needed for languages not covered by LazyVim extras
treesitterParsers = with pkgs.vimPlugins.nvim-treesitter-parsers; [
wgsl # WebGPU Shading Language
templ # Go templ files
];
};Note: Treesitter grammars are installed automatically based on enabled language extras.
Control which packages get installed automatically:
programs.lazyvim = {
enable = true;
# Core LazyVim dependencies (git, ripgrep, fd, etc.)
installCoreDependencies = true; # default: true
extras = {
lang.typescript = {
enable = true;
installDependencies = false; # Skip typescript tools
installRuntimeDependencies = true; # But install nodejs
};
};
};Note: Dependencies are opt-in per language. Set to false to manage packages manually via extraPackages.
extraPackages for missing dependencies.
programs.lazyvim = {
enable = true;
config = {
options = ''
vim.opt.relativenumber = false
vim.opt.wrap = true
'';
keymaps = ''
vim.keymap.set("n", "<leader>w", "<cmd>w<cr>", { desc = "Save" })
'';
};
plugins = {
colorscheme = ''
return {
"catppuccin/nvim",
opts = { flavour = "mocha" },
}
'';
};
};For larger configurations, you can organize your LazyVim config files in a directory:
programs.lazyvim = {
enable = true;
configFiles = ./my-lazyvim-config;
};Directory structure:
my-lazyvim-config/
βββ config/
β βββ keymaps.lua
β βββ options.lua
β βββ autocmds.lua
βββ plugins/
βββ colorscheme.lua
βββ lsp-config.lua
βββ editor.lua
Note: You can mix configFiles with inline config and plugins options, but you cannot configure the same file in both places. For example, if configFiles contains config/keymaps.lua, you cannot also set config.keymaps.
- π Always up-to-date - Automatically tracks LazyVim releases with latest plugin versions
- β Zero-configuration setup - Just enable and go
- π€ Reproducible builds - Core and Extra LazyVim plugins locked and in dev mode.
π Getting Started - Complete setup guide
βοΈ Configuration Reference - Module options and configuration
π― LazyVim Extras - Language and feature support
π§ Plugin Sourcing Strategy - How plugins are resolved and managed
π¨ Troubleshooting - Common issues and solutions
nix flake update # Update to latest LazyVim
home-manager switch # Apply changesMIT