I prefer women’s nylons (yes, seriously), putting the hops in the makeshift nylon bag and tying the bag with 10" of teflon tape and snaking the tape in between the gasket and bail - I prefer the teflon tape to floss since it flattens out a little finer than floss, and I always have teflon tape on my workbench, whereas floss I’d have to go get. I usually leave them in for the duration of the life of the keg, but lately I have been experimenting with removing.
that said, in painting my house recently, I discovered the paint strainer bags which go over the machine nozzle on a paint spraying machine (with cotton tie - not nylon elastic band). those look like they would fit about 2oz of hops in them and they are dirt cheap - 3 for ~$1.50 - I might look to buying a bunch of those for disposable hop bags.
I don’t like muslin for dryhopping since some particles inevitably sneak out, whereas this risk is much less with nylon IMO.
Some lids have a stamped well for the relief valve. You can fasten the bag with a SS hose clamp. I have used the flat goretex floss, but like Paul’s teflon tape idea for the lids I can’t clamp to.
I only dryhop in the keg. I use hop socks with marbles (boiled first), fill them with hops, then toss them in and leave until the keg is empty.
One thing I have learned about dryhopping is that it must be done at room temperature (say 18C) for a period of time. If you dry hop at serving temps, you only get a very grassy unpleasant character. I add my dryhops, leave at room temp for 5-7 days, then move to the kegerator.
Many also have concerns about leaving hops in the keg for an extended period. I have discovered that this works incredibly well at maintaining a fresh hop character, but it is critical that you keep the keg cold after the initial 5-7 days at room temp. If you don’t, you will get a harsh astringent hop character.
I only use citrusy “american” leaf hops that have been kept in excellent condition for dry hopping. Pellet hops have not yielded as good as a result for me.
I have played around with this extensively over the last couple years, and these observations and results have been very consistent.
When I am not experimenting and instead following my best practices, I have found it almost impossible to add too many dry hops - they impart zero bitterness/harshness, just massive amounts of juicy, citrus, dank character that does not fade away at anywhere close to same rate as similar commercial products (even when using relatively small amounts such as 1-2oz).
I use whole hops in muslin bags to dry hop in the keg. Occasionally I’ll get a few particles in the first couple of pours which are usually a bit cloudy with some yeast as well. After that, the beers have been clear as a bell until the kick with the hops left in.