nix-community.nixvim/flake-modules/dev/default.nix

39 lines
808 B
Nix
Raw Normal View History

2024-05-05 19:39:35 +02:00
{ inputs, ... }:
{
imports = [
inputs.git-hooks.flakeModule
inputs.treefmt-nix.flakeModule
2024-05-05 19:39:35 +02:00
./devshell.nix
];
2024-05-05 19:39:35 +02:00
perSystem =
{ pkgs, config, ... }:
2024-05-05 19:39:35 +02:00
{
formatter = config.treefmt.build.wrapper;
treefmt.config = {
inherit (config.flake-root) projectRootFile;
package = pkgs.treefmt;
programs = {
nixfmt-rfc-style.enable = true;
statix.enable = true;
};
};
2024-05-05 19:39:35 +02:00
pre-commit = {
settings.hooks = {
nixfmt = {
package = pkgs.nixfmt-rfc-style;
enable = true;
};
statix = {
enable = true;
excludes = [ "plugins/lsp/language-servers/rust-analyzer-config.nix" ];
};
typos.enable = true;
};
};
};
}