92 lines
2.4 KiB
Nix
92 lines
2.4 KiB
Nix
{
|
|
description = "Neovim derivation";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
gen-luarc.url = "github:mrcjkb/nix-gen-luarc-json";
|
|
|
|
# Add bleeding-edge plugins here.
|
|
# They can be updated with `nix flake update` (make sure to commit the generated flake.lock)
|
|
presence-nvim = {
|
|
url = "github:jiriks74/presence.nvim";
|
|
flake = false;
|
|
};
|
|
workspace-diagnostics-nvim = {
|
|
url = "github:artemave/workspace-diagnostics.nvim";
|
|
flake = false;
|
|
};
|
|
# wf-nvim = {
|
|
# url = "github:Cassin01/wf.nvim";
|
|
# flake = false;
|
|
# };
|
|
};
|
|
|
|
outputs = inputs @ {
|
|
self,
|
|
nixpkgs,
|
|
gen-luarc,
|
|
...
|
|
}: let
|
|
supportedSystems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
"aarch64-darwin"
|
|
];
|
|
|
|
# This is a function that generates an attribute by calling a function you
|
|
# pass to it, with each system as an argument
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
in
|
|
{
|
|
formatter = forAllSystems(system: nixpkgs.legacyPackages.${system}.alejandra);
|
|
|
|
overlays = {
|
|
neovim-overlay = import ./nix/neovim-overlay.nix {inherit inputs;};
|
|
# You can add this overlay to your NixOS configuration
|
|
default = self.outputs.overlays.neovim-overlay;
|
|
};
|
|
|
|
packages = forAllSystems (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ self.outputs.overlays.neovim-overlay ];
|
|
};
|
|
in {
|
|
nvim-pkg = pkgs.nvim-pkg;
|
|
default = self.outputs.packages.${system}.nvim-pkg;
|
|
}
|
|
);
|
|
|
|
devShells = forAllSystems (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
self.outputs.overlays.neovim-overlay
|
|
gen-luarc.overlays.default
|
|
];
|
|
};
|
|
in {
|
|
default = pkgs.mkShell {
|
|
name = "nvim-devShell";
|
|
buildInputs = with pkgs; [
|
|
# Tools for Lua and Nix development, useful for editing files in this repo
|
|
lua-language-server
|
|
nil
|
|
stylua
|
|
luajitPackages.luacheck
|
|
];
|
|
shellHook = ''
|
|
# symlink the .luarc.json generated in the overlay
|
|
ln -fs ${pkgs.nvim-luarc-json} .luarc.json
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
|
|
# templates = {
|
|
# };
|
|
};
|
|
}
|