For filling, cook potatoes in boiling salted water until tender, and drain. If you have a ricer, rice potatoes and stir in butter while hot, otherwise mash by hand. Season to taste and add nutmeg. If adding cheese, allow potatoes to cool, then stir in grated cheese. Chill potato filling before using.
For dough, combine flour and salt. In a separate bowl, whisk eggs, milk and water. Add liquid to flour and stir until blended. The dough should be soft enough that it sticks to the bottom of the bowl, but not so soft that it doesn’t hold its shape. Cover dough and let rest at room temperature for 1 hour, or otherwise chill dough chill until ready to use then pull out of fridge an hour before rolling.
On a lightly floured surface, roll out dough as thinly as possible without tearing. Use a round cutter 3 inches (8 cm) in diameter and cut out circles of dough. Place 1 Tbsp (15 mL) of potato filling into the center of each perogy and pinch the perogy edges closed. Perogies can be frozen on a baking sheet or kept chilled until ready to cook.
To serve, melt butter in a sauté pan over medium-high heat. Add onions, stirring constantly until onions are richly browned. Reduce heat to medium-low. In a pot of boiling salted water, cook about half of the perogies until they float, about 5 minutes.