I managed to make it work after changing a few parameters, here is the code just in case it is useful for anybody:
std::vector<uint32_t> dim1 = {0, 0};
std::vector<uint32_t> levelBudget = {1, 1};
#if NATIVEINT == 128 && !defined(__EMSCRIPTEN__)
ScalingTechnique rescaleTech = FIXEDMANUAL;
usint dcrtBits = 78;
usint firstMod = 89; /*firstMod*/
#else
ScalingTechnique rescaleTech = FLEXIBLEAUTO;
usint dcrtBits = 59;
usint firstMod = 60; /*firstMod*/
#endif
// computes how many levels are needed for
usint depth = levelsRemaining + FHECKKSRNS::GetBootstrapDepth(9, levelBudget, secretKeyDist);
CCParams<CryptoContextCKKSRNS> parameters;
parameters.SetMultiplicativeDepth(depth);
parameters.SetScalingModSize(dcrtBits);
parameters.SetScalingTechnique(rescaleTech);
parameters.SetRingDim(n);
parameters.SetSecretKeyDist(secretKeyDist);
parameters.SetNumLargeDigits(3);
parameters.SetSecurityLevel(HEStd_NotSet);
parameters.SetKeySwitchTechnique(HYBRID);
parameters.SetFirstModSize(firstMod);
CryptoContext<DCRTPoly> cc = GenCryptoContext(parameters);
// Turn on features
cc->Enable(PKE);
cc->Enable(KEYSWITCH);
cc->Enable(LEVELEDSHE);
cc->Enable(ADVANCEDSHE);
cc->Enable(FHE);
const std::shared_ptr<CryptoParametersCKKSRNS> cryptoParams =
std::dynamic_pointer_cast<CryptoParametersCKKSRNS>(cc->GetCryptoParameters());
//this determines the size of the permutation matrix. In this example, we can go up to 64.
auto size_of_permutation = 8;
cc->EvalBootstrapSetup(levelBudget, dim1, size_of_permutation);
auto keyPair = cc->KeyGen();
cc->EvalMultKeyGen(keyPair.secretKey);
cc->EvalBootstrapKeyGen(keyPair.secretKey, size_of_permutation);
std::vector<std::complex<double>> a(
{0.111111, 0.222222, 0.333333, 0.444444, 0.555555, 0.666666, 0.777777, 0.888888,
0.111111, 0.222222, 0.333333, 0.444444, 0.555555, 0.666666, 0.777777, 0.888888,
0.111111, 0.222222, 0.333333, 0.444444, 0.555555, 0.666666, 0.777777, 0.888888,
0.111111, 0.222222, 0.333333, 0.444444, 0.555555, 0.666666, 0.777777, 0.888888,
0.111111, 0.222222, 0.333333, 0.444444, 0.555555, 0.666666, 0.777777, 0.888888,
0.111111, 0.222222, 0.333333, 0.444444, 0.555555, 0.666666, 0.777777, 0.888888,
0.111111, 0.222222, 0.333333, 0.444444, 0.555555, 0.666666, 0.777777, 0.888888,
0.111111, 0.222222, 0.333333, 0.444444, 0.555555, 0.666666, 0.777777, 0.888888});
size_t encodedLength = a.size();
std::vector<std::complex<double>> input(Fill(a, size_of_permutation));
Plaintext plaintext = cc->MakeCKKSPackedPlaintext(input, 1, 0, nullptr, size_of_permutation);
auto ciphertext = cc->Encrypt(keyPair.publicKey, plaintext);
//change this for any function that produces a permutation matrix
std::vector<std::vector<std::complex<double>>> matrix = genIdentityPlaintext(size_of_permutation);
std::cout << "permutation matrix" << matrix << std::endl;
FHECKKSRNS ckksrns;
ckksrns.EvalBootstrapSetup(*cc,levelBudget,dim1,size_of_permutation,0);
double scale = 1;
uint32_t L = depth;
Plaintext result;
auto matrix_pre = ckksrns.EvalLinearTransformPrecompute(*cc, matrix, scale, L);
auto output = ckksrns.EvalLinearTransform(matrix_pre, ciphertext);
cc->Decrypt(keyPair.secretKey, ciphertext, &result);
result->SetLength(encodedLength);
std::cout << "Before permutation = " << result;
cc->Decrypt(keyPair.secretKey, output, &result);
result->SetLength(encodedLength);
std::cout << "After permutation = " << result;