summary refs log tree commit diff stats
path: root/user/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'user/install.sh')
-rwxr-xr-xuser/install.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/user/install.sh b/user/install.sh
new file mode 100755
index 00000000..8e0ca702
--- /dev/null
+++ b/user/install.sh
@@ -0,0 +1,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