feat(home): add declarative Neovim via nixvim

New `nixvim` flake input (release branch, follows nixpkgs) drives the whole
editor from `modules/nvim.nix`, wired into `homeModules.default`. Minimal LSP
baseline (`nixd`, `bashls`) exposed as `local.nvim.lspServers`; blink-cmp,
Telescope, neo-tree, lualine, treesitter, colorizer, gitsigns, toggleterm, and a
catppuccin theme. which-key groups plus `<leader>?`/`<leader>sk` give an
in-editor keybind cheatsheet; per-directory session persistence with
`sessionoptions` + a `PersistenceSavePre` neo-tree close for clean layouts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 11:51:58 +02:00
parent 94411c0abe
commit 07a78b6012
4 changed files with 350 additions and 3 deletions
+17 -2
View File
@@ -17,9 +17,20 @@
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
# nixvim: declarative Neovim as home-manager options — the whole editor
# (plugins, LSP, keymaps) lives in modules/nvim.nix, pinned by this flake's
# lock. Track the release branch matching nixpkgs (a mismatched branch fails
# with `vimPlugins.<name> not found`). `follows` keeps one nixpkgs: both are
# on the same stable channel, so the version skew nixvim warns about (only an
# issue against unstable) does not arise here.
nixvim = {
url = "github:nix-community/nixvim/nixos-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self, nixpkgs, home-manager, rust-overlay, ... }:
outputs = inputs@{ self, nixpkgs, home-manager, rust-overlay, nixvim, ... }:
let
system = "x86_64-linux";
in {
@@ -28,7 +39,11 @@
# imports = [ config.nixosModules.default ];
# home-manager.users.<you>.imports = [ config.homeModules.default ];
nixosModules.default = import ./modules/nixos.nix;
homeModules.default = import ./modules/home.nix;
# nixvim's home-manager module rides along so `modules/nvim.nix` can set
# `programs.nixvim.*`; consumers get the editor by importing this one module.
homeModules.default = {
imports = [ nixvim.homeModules.nixvim ./modules/home.nix ];
};
# ---- The example / template host -----------------------------------
# Real and buildable; dogfoods the modules above. Clone, replace