diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-11-23 14:09:50 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-11-23 14:09:50 -0300 |
commit | 7e2670e1760d3360df1e820457c98799018100ab (patch) | |
tree | c3ba7f26a1715f4b1db879b7003cd8bf666f1994 /share/hoarder/nix/unix/linux/install | |
parent | eebbbbb7ae0b4ede99499d2ebf5337d8c1b3ef76 (diff) | |
download | trashman-7e2670e1760d3360df1e820457c98799018100ab.tar.gz trashman-7e2670e1760d3360df1e820457c98799018100ab.tar.bz2 |
Fix: move nix to hoarder
Diffstat (limited to 'share/hoarder/nix/unix/linux/install')
-rwxr-xr-x | share/hoarder/nix/unix/linux/install | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/share/hoarder/nix/unix/linux/install b/share/hoarder/nix/unix/linux/install new file mode 100755 index 0000000..d41abb4 --- /dev/null +++ b/share/hoarder/nix/unix/linux/install @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Install Nix package manager. +# + +# Parameters +SHARE="$1" +BASE="$SHARE/../.." + +# Include basic functions +. $SHARE/trashman/functions || exit 1 + +# Check for curl +if ! which curl > /dev/null 2>&1; then + trashman_echo "Needs curl to install Nix" + exit 1 +fi + +# https://nixos.org/nix/manual/#sect-multi-user-installation +sudo mkdir -m 0755 /nix && sudo chown $(whoami) /nix +sudo group add nixbld + +sh <(curl -L https://nixos.org/nix/install) |