anchor.diff:            port = 3807;
           };
         };
  +      registry = lib.optionalAttrs cfg.registry.enable {
  +        enabled = true;
  +        host = cfg.registry.externalAddress;
  +        port = cfg.registry.externalPort;
  +        key = cfg.registry.keyFile;
  +        api_url = "http://${config.services.dockerRegistry.listenAddress}:${toString config.services.dockerRegistry.port}/";
  +        issuer = "gitlab-issuer";
  +      };
         extra = {};
         uploads.storage_path = cfg.statePath;
       };
  
positive.code:       };
      };
  
      # Use postfix to send out mails.
      services.postfix.enable = mkDefault (cfg.smtp.enable && cfg.smtp.address == "localhost");
  
  
negative.code:           This should be a string, not a nix path, since nix paths are
            copied into the world-readable nix store.
          '';
        };
  
        registry = {
          enable = mkOption {
            type = types.bool;
            default = false;
            description = "Enable GitLab container registry.";
          };
          host = mkOption {
            type = types.str;
            default = config.services.gitlab.host;
            description = "GitLab container registry host name.";
          };
          port = mkOption {
            type = types.int;
            default = 4567;
            description = "GitLab container registry port.";
          };
          certFile = mkOption {
            type = types.path;
            default = null;
            description = "Path to GitLab container registry certificate.";
          };
          keyFile = mkOption {
            type = types.path;
            default = null;
            description = "Path to GitLab container registry certificate-key.";
          };
          defaultForProjects = mkOption {
            type = types.bool;
            default = cfg.registry.enable;
            description = "If GitLab container registry should be enabled by default for projects.";
          };
          issuer = mkOption {
            type = types.str;
            default = "gitlab-issuer";
            description = "GitLab container registry issuer.";
          };
          serviceName = mkOption {
            type = types.str;
            default = "container_registry";
            description = "GitLab container registry service name.";
          };
          externalAddress = mkOption {
            type = types.str;
            default = "";
            description = "External address used to access registry from the internet";
          };
          externalPort = mkOption {
            type = types.int;
            description = "External port used to access registry from the internet";
          };
        };
  
        smtp = {
  