anchor.diff:  
         script = ''
           ${pkgs.docker-distribution}/bin/registry serve \
  -          ${pkgs.docker-distribution.out}/share/go/src/github.com/docker/distribution/cmd/registry/config-example.yml
  +          /etc/docker/registry/config.yml
         '';
   
         serviceConfig = {
  
positive.code:   };
  
    config = mkIf cfg.enable {
      systemd.services.docker-registry = {
        description = "Docker Container Registry";
        wantedBy = [ "multi-user.target" ];
  
negative.code: 
  let
    cfg = config.services.dockerRegistry;
  
    blogCache = if cfg.enableRedisCache
        then "redis"
        else "inmemory";
  
    registryConfig = {
      version =  "0.1";
      log = {
        fields = {
          service = "registry";
        };
      };
      storage = {
        cache = {
          blobdescriptor = "${blogCache}";
        };
        filesystem = {
          rootdirectory = "/var/lib/registry";
        };
        delete = {
          enabled = cfg.enableDelete;
        };
      };
      http = {
        addr = ":5000";
        headers = {
          X-Content-Type-Options = "[nosniff]";
        };
      };
      health = {
        storagedriver = {
          enabled = true;
          interval = "10s";
          threshold = 3;
        };
      };
    };
  
    registryConfig.redis = mkIf cfg.enableRedisCache {
      addr = "${cfg.redisUrl}";
      password = "${cfg.redisPassword}";
      db = 0;
      dialtimeout = "10ms";
      readtimeout = "10ms";
      writetimeout = "10ms";
      pool = {
        maxidle = 16;
        maxactive = 64;
        idletimeout = "300s";
      };
    };
  
  in {
    options.services.dockerRegistry = {
  