How to reserve ports

Hi!

Is there a way to reserve some ports on NixOS e. g. for docker containers, so none other application can use them?

Best,
Miro

Not that I know of, I ended up creating my own options with some uniqueness assertions.

Would you be willing to share that?