fmt: reformat *.toml with tombi, add tombi to treefmt.nix
This commit is contained in:
+20
-5
@@ -1,12 +1,27 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [ inputs.treefmt.flakeModule ];
|
||||
perSystem.treefmt = {
|
||||
{ inputs, ... }: {
|
||||
imports = [
|
||||
inputs.treefmt.flakeModule
|
||||
];
|
||||
perSystem.treefmt = { lib, pkgs, ... }: {
|
||||
projectRootFile = "flake.nix";
|
||||
programs = {
|
||||
nixfmt.enable = true;
|
||||
stylua.enable = true;
|
||||
keep-sorted.enable = true;
|
||||
stylua.enable = true;
|
||||
};
|
||||
settings.formatter.tombi = {
|
||||
command = "${pkgs.bash}/bin/bash";
|
||||
options = [
|
||||
"-euc"
|
||||
''
|
||||
for file in "$@"; do
|
||||
${lib.getExe pkgs.tombi} fmt $file
|
||||
done
|
||||
''
|
||||
"--"
|
||||
];
|
||||
includes = [ "*.toml" ];
|
||||
};
|
||||
settings.excludes = [ "secrets/*" ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user