feat: (incomplete) nix integration

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-03-15 21:34:05 -03:00
parent f97d64c598
commit 3ce2317ee8
5 changed files with 353 additions and 0 deletions

51
flake.nix Normal file
View File

@@ -0,0 +1,51 @@
{
description = "My NeoVim config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
neovim = {
url = "github:neovim/neovim/stable?dir=contrib";
inputs.nixpkgs.follows = "nixpkgs";
};
gen-luarc.url = "github:mrcjkb/nix-gen-luarc-json";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, neovim, flake-utils, gen-luarc, ... }@inputs:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
];
neovim-overlay = import ./overlay.nix { inherit inputs; };
in
flake-utils.lib.eachSystem supportedSystems
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
neovim-overlay
gen-luarc.overlays.default
];
};
shell = pkgs.mkShell {
name = "nvim-devShell";
builtInputs = with pkgs; [
lua-language-server
nil
stylua
luajitPackages.luacheck
deno
];
shellHook = ''
ln -fs ${pkgs.nvim-luarc-json} .luarc.json
'';
};
in
{
packages = rec { default = nvim; nvim = pkgs.nvim-pkg; };
devShells = { default = shell; };
}) // { overlays.default = neovim-overlay; };
}