{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
self,
nixpkgs,
flake-parts,
nixvim,
}:
flake-parts.lib.mkFlake {
inherit inputs;
} {
systems = [
"x86_64-linux"
];
perSystem = {
pkgs,
system,
...
}: let
nvLib = nixvim.lib.${system};
nv = nixvim.legacyPackages.${system};
nvModule = {
inherit pkgs;
module = import ./config;
};
nvim = nv.makeNixvimWithModule nvModule;
in {
checks.default = nvLib.check.mkTestDerivationFromNixvimModule nvModule;
packages = {
inherit nvim;
default = nvim;
};
devShells.default = pkgs.mkShell {
buildInputs = [
nvim
pkgs.nil
pkgs.alejandra
];
};
};
};
}