{
  self,
  config,
  lib,
  withSystem,
  inputs,
  ...
}:
{
  # Public `lib` flake output
  flake.lib = {
    nixvim = lib.makeOverridable ({ lib }: (lib.extend self.lib.overlay).nixvim) {
      # NOTE: Use the lib from nixpkgs pin to prevent a dependency
      # on pinning the flake-parts nixpkgs-lib to the nixpkgs pin
      inherit (inputs.nixpkgs) lib;
    };
    overlay = import ../lib/overlay.nix {
      flake = self;
    };
    # Top-top-level aliases
    inherit (self.lib.nixvim)
      evalNixvim
      ;
  }
  // lib.genAttrs config.systems (
    lib.flip withSystem (
      { pkgs, system, ... }:
      {
        # NOTE: this is the publicly documented flake output we've had for a while
        check = pkgs.callPackage ../lib/tests.nix {
          inherit lib self system;
        };
      }
    )
  );
}
