Let's see if there is a possible way to immunize against CN on the basis of how CN affects the body:
Immunity is impossible: you would need to change EVERYTHING
The chemical reaction cyanide - CN - has with the blood is cyanide poisoning. It results in the inability of cells to take the oxygen from the blood by inhibiting the cytochrome c oxidase enzyme. As a result, the blood becomes over oxygenated and the skin appears very red. In a non-fatal dose, the CN will get metabolized into thiocyanate and a complex aminoacid, which then get metabolized further over time. The first step occurs usually within one hour of exposure, unless the dose results in the death of the body from the inability to get oxygen to the cells.
As the effect of CN is on a crucial part of the cell membranes that is shared by every oxygen-consuming organism on earth, including most bacteria, you need a species that has a totally different genetic set up and does not use a molecule even remotely similar to cytochrome c oxidase. This means you need to start your alterations back with a totally different startup in evolution. To he immune to CN, the organisms would need to evolve in a CN-rich environment and have to cope with the naturally occurring CN in the phase of evolution when oxygen-consuming organisms started to evolve.
Lack of the cytochrome c oxidase (CCO) would immunize to CN, but there is no breathing life without it that we know of. So even if we could make a human without CCO (we can't!), we know of no other mechanism that can get the oxygen from the hemoglobin into the cells, so any tissue that is affected by such a modification (which we can't do in the first place) would be doomed to die from suffocation and ATP deprivation.
Best available: reduced sensitivity
The best available method that could be implemented to increase the dose of CN that is non-lethal on a human body is a large dose of hydroxycobalamin / Vitamin B12 into the bloodstream, as it bonds more readily with CN than the CCO does. It is also the active resulting molecule in over-the-counter nutritional supplements to counter B12 deficiencies like Cyanocobalamin. In this application dosages of 1 gram are common.
As B12 is generally safe, non-toxic even in large doses, and has only comparatively low impact side effects (compared to other antitoxins) it has become the standard treatment for Cyanide poisoning. Its closest competitors were Sodium Thiosulphate, which is considered more problematic and sometimes too slow as discussed in this paper, and dicobalt edetate or 4-dimethyl-aminophenol, both also quite problematic as discussed in this paper. Because of its nearly nonexistent toxicity, it is given in comparatively extreme doses compared to other antitoxins when used as emergency aid against acute CN exposure: a 90 kg person will get a dose of about 13 grams B12 to fight off an acute cyanide poisoning.
Why do I say it's a massive dose? Because measuring active ingredients in grams per milliliter is huge: Atropine, the counteragent for organophosphates (and a nerve agent itself!) is packaged in autoinjectors that contain 1.67 mg and the dosage information prescribes only at max 3 of these, so the total max dose is about 5 mg, or $\frac {38} {1000}$ of the dose that is considered safe and sane for Vitamin B12!
The least impact route would be to keep the hydroxycobalamin levels high and increase the tolerance would be a daily dose of B12, either in the shape of pills or, especially in high exposure areas, by injection. It might also be advisable to have some autoinjectors handy in case of acute exposure.
Forget about genetic modifications
Currently, we are not able to modify humans in the degree needed to produce Vitamin B12 naturally, especially not in the doses needed to counteract cyanide.