nix/install: Rewrite to not rely on bashisms.

Gets rid of [[ ... ]] and provides a fallback to "which" if the "type"
builtin is not available.

Also, this now longer relies on "set -e", because we're checking the
errors carefully by ourselves and properly clean up whenever there was
an error.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
nix/install: Don't rely on tar for decompression.

Older versions of tar didn't detect the compression type and thus tried
to extract an uncompressed archive and even older versions of tar didn't
even have the -j argument at all, so let's download, decompress and
unpack in one go.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
nix: Fix install instructions to not rely on bash.

Of course, the install script from Nix itself will use bash, but that's
an entirely different case. The problem with the install instructions
itself is that it even relied on bash for its "<()" syntax.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
nix/install: Re-add shell script wrapper.

As @edolstra pointed out, this is to prevent execution of a partially
downloaded script. So let's reintroduce the wrapper with a comment to
make sure it won't be removed again.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>