nixvim/flake.nix
Lander Van den Bulcke 06bfb44459
feat: add puppet lsp package
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
2025-09-30 10:02:52 +02:00

75 lines
1.8 KiB
Nix

{
description = "deCort.tech NeoVim configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
nixvim = {
url = "github:nix-community/nixvim";
};
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
};
};
outputs =
{
nixpkgs,
nixvim,
flake-parts,
pre-commit-hooks,
...
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
perSystem =
{
pkgs,
system,
self',
lib,
...
}:
let
nixvimLib = nixvim.lib.${system};
nixvim' = nixvim.legacyPackages.${system};
nixvimModule = {
inherit pkgs;
module = import ./config; # import the module directly
# You can use `extraSpecialArgs` to pass additional arguments to your module files
extraSpecialArgs = {
# inherit (inputs) foo;
};
};
nvim = nixvim'.makeNixvimWithModule nixvimModule;
in
{
checks = {
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
statix.enable = true;
nixfmt-rfc-style.enable = true;
};
};
};
formatter = pkgs.nixfmt-rfc-style;
packages = {
default = nvim;
};
devShells = {
default = with pkgs; mkShell { inherit (self'.checks.pre-commit-check) shellHook; };
};
};
};
}