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

42 lines
801 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, ... }:
let
fmt = pkgs.nixfmt-rfc-style;
in
2024-05-05 19:39:35 +02:00
{
treefmt.config = {
projectRootFile = "flake.nix";
programs = {
nixfmt = {
enable = true;
package = fmt;
};
statix.enable = true;
};
};
2024-05-05 19:39:35 +02:00
pre-commit = {
settings.hooks = {
nixfmt-rfc-style = {
2024-05-05 19:39:35 +02:00
enable = true;
package = fmt;
2024-05-05 19:39:35 +02:00
};
statix = {
enable = true;
excludes = [ "plugins/lsp/language-servers/rust-analyzer-config.nix" ];
};
typos.enable = true;
};
};
};
}