{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
    utils.url = "github:numtide/flake-utils";
  };
  outputs = { self, nixpkgs, utils }:
    utils.lib.eachDefaultSystem (system: let
      pkgs = nixpkgs.legacyPackages."${system}";
      commitShaShort = if self ? rev then (pkgs.lib.substring 0 10 self.rev) else self.dirtyShortRev;
    in rec {
      packages.hagrid = pkgs.callPackage ./. { inherit commitShaShort; };
      packages.hagridctl = pkgs.callPackage ./hagridctl.nix { };
      packages.wkdDomainChecker = pkgs.callPackage ./wkd-domain-checker/. { };

      packages.default = packages.hagrid;

      packages.hagridAboutPages = pkgs.callPackage ./aboutPages { };
    }) // {
      overlays.hagrid = (final: prev: {
        hagrid = self.packages."${final.system}".hagrid;
        hagridctl = self.packages."${final.system}".hagridctl;
        hagridAboutPages = self.packages."${final.system}".hagridAboutPages;
      });
      overlays.wkdDomainChecker = (final: prev: { wkdDomainChecker = self.packages."${final.system}".wkdDomainChecker; });

      overlays.default = self.overlays.hagrid;
    };
}
