From fa8a6f493f1b5060fa306e39a5502df56f4f02c1 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 16 May 2021 09:49:15 -0400 Subject: move stuff into profiles --- install.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index a16d8a6..4b19d53 100755 --- a/install.sh +++ b/install.sh @@ -2,16 +2,21 @@ # set -euxo pipefail # -[[ -z "$1" ]] && echo "usage: install.sh " && exit 1 +[[ -z "$1" ]] \ + && echo "usage: install.sh " \ + && echo "where is something from the 'profiles' directory" \ + && exit 1 # mkdir -p ~/.config/nixpkgs NIXDIR="$HOME/.config/nixpkgs" HOMEFILE="$NIXDIR/home.nix" NIXFILE="$(pwd)/$1" # -# -[[ -e "$HOMEFILE" ]] || ln -s "$NIXFILE" "$HOMEFILE" -[[ -e "$NIXDIR/config.nix" ]] || ln -s "$(pwd)/lib/config.nix" "$NIXDIR/config.nix" +# start from scratch +rm "$HOMEFILE" +ln -s "$NIXFILE" "$HOMEFILE" +rm "$NIXDIR/config.nix" +ln -s "$(pwd)/lib/config.nix" "$NIXDIR/config.nix" # # the notmuch config location is by default ~/.notmuch-config, but home-manager # puts it at ~/.config/notmuch/notmuchrc (which makes sense) and then sets -- cgit v1.2.3