summaryrefslogtreecommitdiff
path: root/hooks/pre-up/2-nix
blob: cfba81f1eef33bcb51e7d24d04b596e05b0e09d2 (plain)
1
2
3
4
5
6
7
8
#!/bin/mksh

if ! [ -x "$(command -v nix)" ]; then
  echo "Installing Nix"
  sudo install -d -m755 -o $(id -u) -g $(id -g) /nix
  curl -L https://nixos.org/nix/install | sh
fi