buildbot-nix/nix/treefmt/flake-module.nix

27 lines
677 B
Nix
Raw Normal View History

2023-09-18 13:14:45 +00:00
{ inputs, ... }: {
imports = [
inputs.treefmt-nix.flakeModule
];
perSystem = { pkgs, ... }: {
2023-09-18 13:14:45 +00:00
treefmt = {
projectRootFile = ".git/config";
programs.nixpkgs-fmt.enable = true;
programs.shellcheck.enable = true;
programs.deno.enable = true;
2024-07-08 23:54:08 +00:00
programs.ruff.check = true;
programs.ruff.format = true;
2023-09-18 13:14:45 +00:00
settings.formatter.shellcheck.options = [ "-s" "bash" ];
2024-01-01 07:32:22 +00:00
programs.mypy = {
enable = true;
directories.".".extraPythonPackages = [
pkgs.python3.pkgs.twisted
];
};
2024-07-08 23:54:08 +00:00
settings.formatter.ruff-check.priority = 1;
settings.formatter.ruff-format.priority = 2;
2023-09-18 13:14:45 +00:00
};
};
}