Last active
October 28, 2020 03:06
-
-
Save puffnfresh/a4a63bc26ead1635e222 to your computer and use it in GitHub Desktop.
Installation script for Nix on ChromeOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo mount -o remount,exec /tmp | |
if [ -x /usr/local/nixstrap/proot-x86_64 ] && [ -h ~/.nix-profile ]; then | |
echo "Launching shell with nix-* tools!" | |
exec /usr/local/nixstrap/proot-x86_64 -b /usr/local/nixstrap/nix-1.8-x86_64-linux:/nix bash --init-file ~/.nix-profile/etc/profile.d/nix.sh | |
fi | |
set -e | |
set -x | |
sudo mkdir -p /usr/local/nixstrap | |
sudo chown chronos:chronos /usr/local/nixstrap | |
cd /usr/local/nixstrap | |
NIX_TAR=nix-1.8-x86_64-linux.tar.bz2 | |
wget -O $NIX_TAR http://hydra.nixos.org/build/17897595/download/1/$NIX_TAR | |
tar xvf $NIX_TAR | |
rm $NIX_TAR | |
wget -O proot-x86_64 http://static.proot.me/proot-x86_64 | |
chmod u+x proot-x86_64 | |
./proot-x86_64 -b nix-1.8-x86_64-linux:/nix /nix/install | |
set +x | |
echo "Installation successful." | |
echo "Run this script again to gain access to the Nix tools." |
In the Pixelbook I get:
user@penguin:~$ ./chromebook-nix.sh
mount: /tmp not mounted or bad option
In some cases useful info is found in syslog - try
dmesg | tail or so.
+ sudo mkdir -p /usr/local/nixstrap
+ sudo chown chronos:chronos /usr/local/nixstrap
chown: invalid user: ‘chronos:chronos’
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how about a variant for arm?