summary refs log tree commit diff stats
path: root/install.sh
diff options
context:
space:
mode:
authorAlan Pearce2019-10-01 21:24:50 +0200
committerAlan Pearce2019-10-01 22:17:40 +0200
commitd0200a6b07e497d07dff2cfe0857f4dceb724b58 (patch)
tree55e43bfb932b298a6c16a3e892c8cef0451d377a /install.sh
parent75166a4de865570f27c074c82e47168ac8630f83 (diff)
downloadnixfiles-d0200a6b07e497d07dff2cfe0857f4dceb724b58.tar.lz
nixfiles-d0200a6b07e497d07dff2cfe0857f4dceb724b58.tar.zst
nixfiles-d0200a6b07e497d07dff2cfe0857f4dceb724b58.zip
Prepare for home-manager migration
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/install.sh b/install.sh
new file mode 100755
index 00000000..8e0ca702
--- /dev/null
+++ b/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