How to disable SSL certificate checking?

I’ve started getting SSL errors when trying to do nix-env -iA packagename or nix-channel --update, which does not allow to install anything from nixpkgs. This is due to my employers MITM HTTP proxy probably. Anyway, I don’t care about certificate validity (because it isn’t production machine) and I would like to tell nix to just ignore this errors.

How can I disable SSL checking or use nixpkgs repository over regular HTTP (not HTTPS)?


I’d like to have an option to disable cert-checking, too. It’s sometimes nice for quick testing and debugging and at my company we’re behind SSL-interception in some networks.