nvim/flake.nix

42 lines
1 KiB
Nix
Raw Normal View History

2024-02-19 16:58:17 +00:00
{
description = "Guanran928's nvim config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs:
inputs.flake-utils.lib.eachDefaultSystem (
system: let
inherit (inputs.nixpkgs) lib;
pkgs = inputs.nixpkgs.legacyPackages.${system};
in {
packages.default = let
2024-02-19 19:55:33 +00:00
runtimeDeps = with pkgs; [
# mason / tree-sitter
gcc
cargo
];
in
2024-02-19 16:58:17 +00:00
pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped
(pkgs.neovimUtils.makeNeovimConfig
{
customRC = ''
set runtimepath^=${./.}
source ${./.}/init.lua
'';
}
// {
wrapperArgs = ["--prefix" "PATH" ":" "${lib.makeBinPath runtimeDeps}"];
2024-02-19 19:55:33 +00:00
});
2024-02-19 16:58:17 +00:00
devShells.default = pkgs.mkShell {
nativeBuildInputs = [
pkgs.stylua
];
};
}
);
}