summaryrefslogtreecommitdiff
path: root/install.sh
blob: a9bf4d8395001096eb35ccc1be391ff6cd8231f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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