nvim/flake.nix

41 lines
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
];
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
}