mirror of
https://github.com/perstarkse/minne.git
synced 2026-06-30 01:51:43 +02:00
43 lines
891 B
Nix
43 lines
891 B
Nix
_: {
|
|
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)";
|
|
};
|
|
};
|
|
}
|