anchor.diff:      })
     ];
   }
  -
  
positive.code:   defaultConfig = builtins.fromJSON (builtins.replaceStrings [ "\\u0026" ] [ "&" ]
      (readFile "${pkgs.mattermost}/config/config.json")
    );
  
    mattermostConf = foldl recursiveUpdate defaultConfig
      [ { ServiceSettings.SiteURL = cfg.siteUrl;
          ServiceSettings.ListenAddress = cfg.listenAddress;
          TeamSettings.SiteName = cfg.siteName;
          SqlSettings.DriverName = "postgres";
          SqlSettings.DataSource = "postgres://${cfg.localDatabaseUser}:${cfg.localDatabasePassword}@localhost:5432/${cfg.localDatabaseName}?sslmode=disable&connect_timeout=10";
        }
        cfg.extraConfig
      ];
  
negative.code:           mkdir -p ${cfg.statePath}/{data,config,logs}
            ln -sf ${pkgs.mattermost}/{bin,fonts,i18n,templates,client} ${cfg.statePath}
          '' + lib.optionalString (!cfg.mutableConfig) ''
            rm -f ${cfg.statePath}/config/config.json
            cp ${mattermostConfJSON} ${cfg.statePath}/config/config.json
            ${pkgs.mattermost}/bin/mattermost config migrate ${cfg.statePath}/config/config.json ${database}
          '' + lib.optionalString cfg.mutableConfig ''
            if ! test -e "${cfg.statePath}/config/.initial-created"; then
              rm -f ${cfg.statePath}/config/config.json
  