anchor.diff:  federation_rc_sleep_delay: ${cfg.federation_rc_sleep_delay}
   federation_rc_reject_limit: ${cfg.federation_rc_reject_limit}
   federation_rc_concurrent: ${cfg.federation_rc_concurrent}
  -media_store_path: "/var/lib/matrix-synapse/media"
  -uploads_path: "/var/lib/matrix-synapse/uploads"
  +media_store_path: "${cfg.dataDir}/media"
  +uploads_path: "${cfg.dataDir}/uploads"
   max_upload_size: "${cfg.max_upload_size}"
   max_image_pixels: "${cfg.max_image_pixels}"
   dynamic_thumbnails: ${boolToString cfg.dynamic_thumbnails}
  
positive.code:       preStart = ''
          ${cfg.package}/bin/homeserver \
            --config-path ${configFile} \
            --keys-directory /var/lib/matrix-synapse \
            --generate-keys
        '';
        serviceConfig = {
          Type = "simple";
          User = "matrix-synapse";
          Group = "matrix-synapse";
          WorkingDirectory = "/var/lib/matrix-synapse";
          PermissionsStartOnly = true;
          ExecStart = "${cfg.package}/bin/homeserver --config-path ${configFile} --keys-directory /var/lib/matrix-synapse";
          Restart = "on-failure";
        };
      };
  
negative.code:           A yaml python logging config file
          '';
        };
        dataDir = mkOption {
          type = types.str;
          default = "/var/lib/matrix-synapse";
          description = ''
            The directory where matrix-synapse stores its stateful data such as
            certificates, media and uploads.
          '';
        };
      };
    };
  
  