11.stylix/flake/dev/treefmt.nix
awwpotato 8f3259dbc5
flake/dev: use treefmt flake parts module (#1551)
Link: https://github.com/nix-community/stylix/pull/1551

Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-07-08 10:32:19 -07:00

41 lines
874 B
Nix

{ inputs, ... }:
{
imports = [ inputs.treefmt-nix.flakeModule ];
perSystem.treefmt = {
projectRootFile = "flake.nix";
programs = {
# keep-sorted start block=yes newline_separated=no
biome = {
enable = true;
settings.formatter = {
indentStyle = "space";
indentWidth = 2;
lineWidth = 80;
};
includes = [
"*.css"
"*.js"
"*.json"
];
excludes = [
# Contains custom syntax that biome can't handle
"modules/swaync/base.css"
];
};
keep-sorted.enable = true;
nixfmt = {
enable = true;
width = 80;
};
ruff-format = {
enable = true;
lineLength = 80;
};
shfmt.enable = true;
stylish-haskell.enable = true;
# keep-sorted end
};
};
}