nvim/flake.nix

46 lines
1.1 KiB
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
2024-02-26 19:06:11 +00:00
nodejs
2024-02-21 06:54:29 +00:00
# telescope
ripgrep
fd
2024-02-21 02:52:23 +00:00
];
in {
2024-02-21 02:55:06 +00:00
### nix {run,shell,build}
2024-02-21 02:52:23 +00:00
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:55:06 +00:00
### nix fmt
2024-02-21 02:57:48 +00:00
formatter = pkgs.alejandra;
2024-02-21 02:55:06 +00:00
### nix develop
2024-02-21 02:52:23 +00:00
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
stylua
];
};
});
2024-02-19 16:58:17 +00:00
}