tern 3.1.6

Embedded database migrations in SQL or Rust.
Documentation
{ inputs, ... }:
{
  imports = [
    inputs.treefmt-nix.flakeModule
    inputs.actions-nix.flakeModules.default

    ./ci
    ./crate.nix
    ./lib.nix
    ./shells.nix
  ];

  perSystem =
    {
      lib,
      pkgs,
      self',
      ...
    }:
    {
      apps.default = {
        meta = "Format project source";
        program = pkgs.writeShellApplication {
          name = "fmtt";
          text = ''${lib.getExe self'.formatter} "$@"'';
        };
      };

      treefmt = {
        projectRootFile = "flake.nix";
        programs = {
          rustfmt.enable = true;
          nixfmt.enable = true;
          typos.enable = true;
        };
        settings.formatter.rustfmt = {
          options = [
            "--config-path"
            "rustfmt.toml"
          ];
        };
      };
    };
}