Migrate from home-manager neovim to NixVim
Major configuration migration following 2025 best practices: - Add nixvim flake input with proper nixpkgs following - Import nixvim.homeManagerModules.nixvim in home configuration - Convert nvim.nix from programs.neovim to programs.nixvim - Migrate all settings to declarative NixVim syntax: * vim.opt.* → opts.* * vim.g.mapleader → globals.mapleader * Raw Lua keymaps → structured keymaps array * Plugin configs → declarative plugin options - Preserve all functionality: * Gruvbox hard contrast colorscheme * nvim-tree with dotfile/gitignore filters * Treesitter with all grammars * Lualine with relative paths and gruvbox theme * Fugitive git integration * System clipboard keybindings * All leader key mappings Benefits: Type safety, better documentation, cleaner code structure 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
303cf90e95
commit
dd5753a87d
3 changed files with 311 additions and 81 deletions
13
flake.nix
13
flake.nix
|
|
@ -7,10 +7,12 @@
|
|||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||
claude-code.url = "github:sadjow/claude-code-nix";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, claude-code }:
|
||||
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, nixvim, claude-code }:
|
||||
let
|
||||
configuration = { pkgs, ... }: {
|
||||
environment.systemPackages =
|
||||
|
|
@ -26,7 +28,12 @@
|
|||
};
|
||||
|
||||
homeConfiguration = { pkgs, ... }: {
|
||||
imports = [ ./nvim.nix ./tmux.nix ./zsh.nix ];
|
||||
imports = [
|
||||
nixvim.homeManagerModules.nixvim
|
||||
./nvim.nix
|
||||
./tmux.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
||||
home.username = "yanlin";
|
||||
home.homeDirectory = "/Users/yanlin";
|
||||
|
|
@ -64,7 +71,7 @@
|
|||
homeConfigurations.yanlin = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
|
||||
modules = [ homeConfiguration ];
|
||||
extraSpecialArgs = { inherit claude-code; };
|
||||
extraSpecialArgs = { inherit claude-code nixvim; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue