Skip to content

Instantly share code, notes, and snippets.

@davidar
Created November 7, 2015 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidar/1735e4c3b5d4eb7ec92b to your computer and use it in GitHub Desktop.
Save davidar/1735e4c3b5d4eb7ec92b to your computer and use it in GitHub Desktop.
#!/bin/sh
# https://nixos.org/wiki/How_to_install_nix_in_home_%28on_another_distribution%29#PRoot_Installation
OPT=$HOME/opt
ARCH=x86_64
VER_NIX=nix-1.10-$ARCH-linux
URL_NIX=http://hydra.nixos.org/build/25489771/download/1/$VER_NIX.tar.bz2
mkdir $OPT
mkdir $OPT/bin && cd $OPT/bin && wget http://static.proot.me/proot-$ARCH && chmod u+x proot-$ARCH
mkdir $OPT/nix && cd $OPT/nix && wget $URL_NIX && tar -jxvf $VER_NIX.tar.bz2
echo "$OPT/bin/proot-$ARCH -b $OPT/nix/$VER_NIX/:/nix bash"
echo "/nix/install"
echo ". $HOME/.nix-profile/etc/profile.d/nix.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment