fix everything Eelco proposed at github

prior commit: https://github.com/NixOS/nixos/pull/209