feat(nix): add neovim package output

Create a custom Neovim package that includes the kickstart.nvim
configuration. The package copies init.lua, lua/, and doc/ directories
and loads them at runtime.

This allows users to build and run this Neovim configuration via:
  nix run github:0xWheatyz/kickstart.nvim

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
0xWheatyz 2026-02-19 18:38:48 -05:00
parent 86e65eedab
commit 967628d34b
1 changed files with 32 additions and 1 deletions

View File

@ -10,9 +10,40 @@
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
# Custom Neovim package with this configuration
neovimConfig = pkgs.stdenv.mkDerivation {
name = "kickstart-nvim-config";
src = self;
installPhase = ''
mkdir -p $out
cp -r init.lua $out/
cp -r lua $out/
cp -r doc $out/
${pkgs.lib.optionalString (builtins.pathExists ./AGENT.md) "cp AGENT.md $out/"}
'';
};
neovim-kickstart = pkgs.neovim.override {
configure = {
customRC = ''
lua << EOF
-- Set XDG_CONFIG_HOME to point to our config
vim.env.NVIM_APPNAME = vim.env.NVIM_APPNAME or "nvim-kickstart"
-- Load the kickstart configuration
dofile("${neovimConfig}/init.lua")
EOF
'';
};
};
in in
{ {
# Outputs will be added in subsequent commits packages = {
default = neovim-kickstart;
neovim = neovim-kickstart;
};
} }
); );
} }