Heat the oil in a pot over medium heat. Add the garlic and onion and sauté for about 4 minutes.
Add the thyme and rice and sauté for another 3 minutes.
Stir in the drained pigeon peas and pimento peppers, if using.
Add the coconut milk, water, whole Scotch bonnet pepper, and 1 teaspoon of salt. Stir to combine.
Bring to a boil, then reduce the heat to low and cover the pot. Simmer until the liquid is absorbed and the rice is tender.
Taste and add additional salt if needed. Stir in the coconut oil, fluff the rice, and remove the whole Scotch bonnet pepper before serving.