{ 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; }; }; }; }; }