aboutsummaryrefslogtreecommitdiff
path: root/share/hoarder/nix/unix/linux/install
blob: 900ac368bb185167738269d8288431e2aa8aa627 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
#
# Install Nix package manager.
#

# Parameters
SHARE="$1"
BASE="$2"

# Include basic functions
. $LIB/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)