Backtick dead key, but pressing it twice inserts two of them

I frequently type in french, so I need keys like caret and backtick to act as dead keys

But I also program and write markdown, so I need to type literal backticks quite frequently, but almost always in multiples of 2

On windows, when I press backtick twice, it inserts 2 backticks, which is convenient
(IIRC on MacOS as well)

Since I have moved to NixOS, pressing the backtick key twice only inserts a single backtick
This means to open a markdown code block, I need to press the backtick key 12 times !
(And sometimes that is in the middle of french text, so changing layout is not practical)

How can I make it work in the windows way ?

I was not able to find an answer on my own (even searching for linux more broadly) since the search results are saturated with many different flavours of “what are deadkeys ?”/“Why is this working like this ? (answer: deadkeys)”
The closest I have been able to find is this:

But it actually explains how to make dead keys not dead, not the specific behavior I am looking for

To replicate, easiest is to use the live nixos installer and set your keyboard layout to swiss french (for some reason it is under the german language). It’s a qwertz layout, so it should be almost familiar

Any help is appreciated !