 -    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()) {

 
     // generate config file
-    const QString globalConfig = XdgBaseDirs::findResourceFile("config", QStringLiteral("akonadi/mysql-global.conf"));
+    const QString globalConfig = QStringLiteral(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()) {

-    }
 
-    const QString mysqladminPath = XdgBaseDirs::findExecutableFile(QStringLiteral("mysqladmin"), mysqldSearchPath);
+    const QString mysqladminPath = QLatin1String(NIXPKGS_MYSQL_MYSQLADMIN);
     if (!mysqladminPath.isEmpty()) {
 #ifndef Q_OS_WIN
         defaultCleanShutdownCommand = QStringLiteral("%1 --defaults-file=%2/mysql.conf --socket=%3/mysql.socket shutdown")
