diff options
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -2,16 +2,21 @@ # set -euxo pipefail # -[[ -z "$1" ]] && echo "usage: install.sh <file.nix>" && exit 1 +[[ -z "$1" ]] \ + && echo "usage: install.sh <file.nix>" \ + && echo "where <file.nix> 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 |