flake/treefmt.nix
2024-07-10 07:50:22 +08:00

32 lines
771 B
Nix

{
projectRootFile = "flake.nix";
### nix
programs.deadnix.enable = true;
programs.statix.enable = true;
programs.alejandra.enable = true;
### shell
programs.shfmt.enable = true;
settings.formatter.shfmt.options = ["-i" "2" "-sr"];
programs.shellcheck.enable = true;
settings.formatter.shellcheck.options = [
"-s"
"bash"
"-e"
"SC2016" # shfmt kept doing it, didn't find a toggle to turn it off
];
### toml
programs.taplo.enable = true;
### misc
programs.prettier.enable = true;
settings.formatter.prettier.excludes = [
"hosts/blacksteel/secrets.yaml"
"hosts/lightsail-tokyo/secrets.yaml"
"nixos/profiles/opt-in/mihomo/secrets.yaml"
"nixos/profiles/opt-in/wireless/secrets.yaml"
"secrets.yaml"
];
}