Various changes and fixes with the general aim to support netbooting NixOS

by serving NixOS images from a NixOS machine to anything supporting PXE.

The described concept works alright, but the main piece of code is far from being ready for the general public (ugly hacks), but I got tired of rebasing and stashing these changes.
It should be, I suppose, but for some reason it is not. Expression for wine in nixpkgs has the same problem.