mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
41 lines
801 B
Nix
41 lines
801 B
Nix
{ inputs, ... }:
|
|
{
|
|
imports = [
|
|
inputs.git-hooks.flakeModule
|
|
inputs.treefmt-nix.flakeModule
|
|
./devshell.nix
|
|
];
|
|
|
|
perSystem =
|
|
{ pkgs, config, ... }:
|
|
let
|
|
fmt = pkgs.nixfmt-rfc-style;
|
|
in
|
|
{
|
|
treefmt.config = {
|
|
projectRootFile = "flake.nix";
|
|
|
|
programs = {
|
|
nixfmt = {
|
|
enable = true;
|
|
package = fmt;
|
|
};
|
|
statix.enable = true;
|
|
};
|
|
};
|
|
|
|
pre-commit = {
|
|
settings.hooks = {
|
|
nixfmt-rfc-style = {
|
|
enable = true;
|
|
package = fmt;
|
|
};
|
|
statix = {
|
|
enable = true;
|
|
excludes = [ "plugins/lsp/language-servers/rust-analyzer-config.nix" ];
|
|
};
|
|
typos.enable = true;
|
|
};
|
|
};
|
|
};
|
|
}
|