{ config, lib, pkgs, ... }:

{
  services.dockerRegistry = {
    enable = true;
    port = 6000;
    enableRedisCache = false;
    extraConfig = {
      storage.maintenance.readonly.enabled = true;
    };
  };

  services.nginx.virtualHosts."registry.stuebinm.eu" = {
    locations."/" = {
      proxyPass = "http://localhost:6000";
      proxyWebsockets = true;
    };
    enableACME = true;
    forceSSL = true;
  };

  services.nginx.clientMaxBodySize = "0";
}