{
  description = "A collection of nix flake templates";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

    flake-utils = {
      url = "github:numtide/flake-utils";
      inputs = {
        systems.follows = "systems";
      };
    };

    systems = {
      url = "github:nix-systems/x86_64-linux"; # only evaluate for this system
    };
    treefmt-nix = {
      url = "github:numtide/treefmt-nix";
      inputs = {
        nixpkgs.follows = "nixpkgs";
      };
    };
  };

  outputs = {
    self,
    nixpkgs,
    flake-utils,
    treefmt-nix,
    ...
  }: let
    templates = import ./templates.nix {inherit (nixpkgs) lib;};
  in
    flake-utils.lib.eachDefaultSystem (system: let
      pkgs = nixpkgs.legacyPackages."${system}";
      treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;};
    in {
      devShells.default = pkgs.mkShell {
        packages = with pkgs; [
          cocogitto
        ];
      };

      checks.formatting = treefmtEval.config.build.check self;
      formatter = treefmtEval.config.build.wrapper;
    })
    // {inherit templates;};
}
# vim: ts=2