{ inputs, ... }:
{
  imports = [ inputs.treefmt-nix.flakeModule ];

  perSystem =
    {
      ...
    }:
    {
      treefmt = {
        # Used to find the project root
        projectRootFile = "flake.nix";
        programs.deadnix.enable = true;
        programs.nixfmt.enable = true;
        programs.shellcheck.enable = true;
        programs.yamlfmt.enable = true;
        programs.texfmt.enable = true;
        settings.global.excludes = [
          "AI_Data/**"
          "Figures/**"
        ];

        programs.typos = {
          enable = true;
          threads = 4;
          configFile = "./_typos.toml";
        };
      };

    };
}
