 -    if (mInternalServer && mServerPath.isEmpty()) {
 -        mServerPath = defaultServerPath;
 -    }
-+    mServerPath = QStringLiteral(NIXPKGS_POSTGRES_PG_CTL);
++    mServerPath = QLatin1String(NIXPKGS_POSTGRES_PG_CTL);
      qCDebug(AKONADISERVER_LOG) << "Found pg_ctl:" << mServerPath;
      mInitDbPath = settings.value(QStringLiteral("InitDbPath"), defaultInitDbPath).toString();
      if (mInternalServer && mInitDbPath.isEmpty()) {

     mPassword = settings.value(QStringLiteral("Password")).toString();
     mConnectionOptions = settings.value(QStringLiteral("Options"), defaultOptions).toString();
-    mMysqldPath = settings.value(QStringLiteral("ServerPath"), defaultServerPath).toString();
+    mMysqldPath = QStringLiteral(NIXPKGS_MYSQL_MYSQLD);
     mCleanServerShutdownCommand = settings.value(QStringLiteral("CleanServerShutdownCommand"), defaultCleanShutdownCommand).toString();
     settings.endGroup();
 

 
     // generate config file
-    const QString globalConfig = XdgBaseDirs::findResourceFile("config", QStringLiteral("akonadi/mysql-global.conf"));
+    const QString globalConfig = QLatin1String(NIX_OUT "/etc/xdg/akonadi/mysql-global.conf");
     const QString localConfig  = XdgBaseDirs::findResourceFile("config", QStringLiteral("akonadi/mysql-local.conf"));
     const QString actualConfig = StandardDirs::saveDir("data") + QLatin1String("/mysql.conf");
     if (globalConfig.isEmpty()) {
