{
  inputs = {
    nixpkgs = {
      type = "github";
      owner = "NixOS";
      repo = "nixpkgs";
      ref = "master";
    };
    flake-utils = {
      type = "github";
      owner = "numtide";
      repo = "flake-utils";
      ref = "master";
    };
  };

  outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem
    (system:
      let pkgs = import nixpkgs {
            inherit system;
            config.allowUnfree = true;
          };
          overlay = import ./nix/maildev;

          inherit (pkgs.lib) recursiveUpdate; 
      in {
        devShell = import ./shell.nix { pkgs = self.legacyPackages.${system}; };

        legacyPackages = recursiveUpdate (overlay self.legacyPackages.${system} pkgs) pkgs;
      }
    );
}
