nvim/flake.nix

36 lines
931 B
Nix
Raw Normal View History

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