updated flake to be better lol

This commit is contained in:
2026-06-20 13:30:19 +01:00
parent e46d931775
commit d96d14b91c

View File

@@ -40,19 +40,45 @@
luarocks luarocks
]; ];
nvim-wrapped = pkgs.symlinkJoin { nvimRemoteConfig = pkgs.runCommand "nvim-remote-config" { } ''
name = "nvim-with-lsp"; mkdir -p $out/nvim-remote
paths = [ pkgs.neovim ]; cp ${./init.lua} $out/nvim-remote/init.lua
buildInputs = [ pkgs.makeWrapper ]; cp -r ${./lua} $out/nvim-remote/lua
postBuild = '' '';
wrapProgram $out/bin/nvim \
--prefix PATH : ${pkgs.lib.makeBinPath pkgList} \ mkWrappedNvim =
--set TREE_SITTER_LIB_PATH "${pkgs.tree-sitter}/lib" {
name,
extraWrapArgs ? "",
}:
pkgs.symlinkJoin {
inherit name;
paths = [ pkgs.neovim ];
buildInputs = [ pkgs.makeWrapper ];
meta.mainProgram = "nvim";
postBuild = ''
wrapProgram $out/bin/nvim \
--prefix PATH : ${pkgs.lib.makeBinPath pkgList} \
--set TREE_SITTER_LIB_PATH "${pkgs.tree-sitter}/lib" \
${extraWrapArgs}
'';
};
nvim-wrapped = mkWrappedNvim { name = "nvim"; };
nvim-remote = mkWrappedNvim {
name = "nvim-remote";
extraWrapArgs = ''
--set NVIM_APPNAME "nvim-remote" \
--set XDG_CONFIG_HOME "${nvimRemoteConfig}"
''; '';
}; };
in in
{ {
packages.${system}.default = nvim-wrapped; packages.${system} = {
default = nvim-wrapped;
remote = nvim-remote;
};
devShells.${system}.default = pkgs.mkShell { devShells.${system}.default = pkgs.mkShell {
@@ -62,8 +88,7 @@
shellHook = '' shellHook = ''
export TREE_SITTER_LIB_PATH="${pkgs.tree-sitter}/lib" export TREE_SITTER_LIB_PATH="${pkgs.tree-sitter}/lib"
echo "Neovim LSP environment loaded" export DEVSHELL_NAME="󱄅 flake/#89dceb| neovim/green"
export DEVSHELL_NAME="󱄅 flake/#89dceb"
''; '';
}; };
}; };