Created
December 27, 2019 08:54
-
-
Save StevenHugo/24f436be5af6256d2bf5547a3d16749c to your computer and use it in GitHub Desktop.
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
| #!/usr/bin/env bash | |
| USER_NAME=`whoami` | |
| if ! command -v nix-env >/dev/null 2>&1; then | |
| /usr/bin/sudo mkdir -m 755 /nix; echo 'use-sqlite-wal = false' | /usr/bin/sudo tee -a /nix/nix.conf | |
| curl -o install-nix https://nixos.org/nix/install | |
| if command -v gpg >/dev/null 2>&1; then | |
| curl -o install-nix.sig https://nixos.org/nix/install.sig | |
| gpg --recv-keys B541D55301270E0BCF15CA5D8170B4726D7198DE | |
| gpg --verify ./install-nix.sig | |
| shred -uz -n9 ./install-nix.sig | |
| fi | |
| chmod u+x ./install-nix | |
| if -d /nix; then | |
| /usr/bin/sudo chown USER_NAME -R /nix | |
| fi | |
| . ./install-nix | |
| shred -uz -n9 ./install-nix | |
| . /home/$USER_NAME/.nix-profile/etc/profile.d/nix.sh | |
| nix-channel --add https://nixos.org/channels/nixpkgs-unstable | |
| nix-channel --update | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment