flake: filter out non-neovim files

This commit is contained in:
Guanran Wang 2024-04-10 17:11:28 +08:00
parent 1c1cb9456f
commit dc5c35f23d
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF

View file

@ -22,24 +22,30 @@
inherit (inputs.nixpkgs) lib;
pkgs = inputs.nixpkgs.legacyPackages.${system};
treefmtEval = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
runtimeDeps = with pkgs; [
# mason / tree-sitter
gcc
cargo
nodejs
# telescope
ripgrep
fd
];
in {
### nix {run,shell,build}
packages.default =
packages.default = let
runtimeDeps = with pkgs; [
# mason / tree-sitter
gcc
cargo
nodejs
# telescope
ripgrep
fd
];
src = lib.fileset.toSource {
fileset = lib.fileset.fileFilter (file: file.hasExt "lua") ./.;
root = ./.;
};
in
pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped
(pkgs.neovimUtils.makeNeovimConfig {
customRC = ''
set runtimepath^=${./.}
source ${./.}/init.lua
set runtimepath^=${src}
source ${src}/init.lua
'';
}
// {wrapperArgs = ["--prefix" "PATH" ":" "${lib.makeBinPath runtimeDeps}"];});