diff --git a/flake.nix b/flake.nix index 9c1613d8..19544397 100644 --- a/flake.nix +++ b/flake.nix @@ -10,9 +10,40 @@ flake-utils.lib.eachDefaultSystem (system: let 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 { - # Outputs will be added in subsequent commits + packages = { + default = neovim-kickstart; + neovim = neovim-kickstart; + }; } ); }