dev: toolchain harmonization, additional checks and formatters

This commit is contained in:
Per Stark
2026-06-29 19:48:38 +02:00
parent 1f0c7d4e51
commit de53020961
36 changed files with 1514 additions and 699 deletions
+42
View File
@@ -0,0 +1,42 @@
_: {
perSystem =
{
config,
minneCtx,
...
}:
let
inherit (minneCtx) rustToolchain;
in
{
treefmt = {
projectRootFile = "flake.nix";
programs = {
nixfmt.enable = true;
rustfmt = {
enable = true;
edition = "2024";
package = rustToolchain.toolchain;
};
};
settings.global.excludes = [
"**/.direnv/**"
"**/.data/**"
"**/database/**"
"**/evaluations/cache/**"
"**/evaluations/reports/**"
"**/html-router/node_modules/**"
"**/result/**"
"**/target/**"
];
};
apps.fmt = {
type = "app";
program = "${config.treefmt.build.wrapper}/bin/treefmt";
meta.description = "Format the repository (rustfmt, nixfmt)";
};
};
}