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