Line an 8-inch square baking dish with parchment paper, leaving some overhang for easy removal later.
In a medium saucepan over medium heat, combine the sugar, cocoa powder, butter, heavy cream, and brewed coffee. Stir continuously until the mixture comes to a gentle boil.
Once boiling, reduce the heat to low and let it simmer for about 5 minutes, stirring frequently to prevent burning.
Remove the saucepan from heat and stir in the vanilla extract and salt.
Add the chocolate chips and stir until fully melted and smooth. If using, fold in the chopped nuts.
Pour the fudge mixture into the prepared baking dish, spreading it evenly.
Let the fudge cool at room temperature for about 2 hours, then refrigerate for at least 1 hour until set.
Once set, lift the fudge out of the dish using the parchment overhang and cut into squares.