Pour olive oil into the bottom of a slow cooker. Layer onion slices over the oil. Add green chilli peppers, mustard seeds, cumin seeds, sugar, garlic, salt and pepper. Layer potatoes on top, seasoning each layer with a sprinkle of salt and dried chilli flakes.
Cook on High until potatoes are tender, 3 1/2 to 4 hours. Stir gently before serving.
Substitute coconut oil for the olive oil if preferred.