nvim/flake.nix

40 lines
1,008 B
Nix
Raw Normal View History

2024-02-19 16:58:17 +00:00
{
description = "Guanran928's nvim config";
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:
inputs.flake-utils.lib.eachDefaultSystem (
system: let
inherit (inputs.nixpkgs) lib;
pkgs = inputs.nixpkgs.legacyPackages.${system};
2024-02-21 01:49:32 +00:00
runtimeDeps = with pkgs; [
# mason / tree-sitter
gcc
cargo
];
2024-02-19 16:58:17 +00:00
in {
2024-02-21 01:49:32 +00:00
packages.default =
2024-02-19 16:58:17 +00:00
pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped
2024-02-21 01:49:32 +00:00
(pkgs.neovimUtils.makeNeovimConfig {
2024-02-19 16:58:17 +00:00
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 {
2024-02-21 01:49:32 +00:00
nativeBuildInputs = with pkgs; [
stylua
2024-02-19 16:58:17 +00:00
];
};
}
);
}