{
inputs = {
treefmt-nix.url = "github:JordanForks/treefmt-nix";
};
outputs = { self, nixpkgs, systems, treefmt-nix }:
let
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.);
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
in
{
formatter = eachSystem (pkgs: treefmtEval..config.build.wrapper);
checks = eachSystem (pkgs: {
formatting = treefmtEval..config.build.check self;
});
};
}