summary refs log tree commit diff stats
path: root/install.sh
blob: 8e0ca7020faaacf562be3ed865d0fe966cd56963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -eu

if [ -z "$1" ]
then
  echo "Usage: $0 <machine-file.nix>"
  exit 1
fi

NIXDIR="$HOME/.config/nixpkgs"

if [ ! -f "$1" ]
then
  echo "$1 does not exist"
  exit 1
fi

ln -s $PWD $NIXDIR
ln -s $1 home.nix