#!/usr/bin/env bash # # Downloads and installs home-manager, then symlinks this directory where # home-manager expects it. HM_PATH=https://github.com/rycee/home-manager/archive/master.tar.gz nix-shell $HM_PATH -A install # macOS doesn't have a ~/.config directory by default mkdir -p ~/.config [[ -L ~/config ]] && ln -s ~/config/home.nix ~/.config/nixpkgs/home.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 # NOTMUCH_CONFIG. However, if a program for some reason doesn't read # NOTMUCH_CONFIG (emacs), then it won't find the right config file, so I # override with a symlink. [[ -L ~/.notmuch-config ]] && ln -s ~/.config/notmuch/notmuchrc ~/.notmuch-config