This repository was archived by the owner on Jan 10, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
176 lines (173 loc) · 5.97 KB
/
Makefile
File metadata and controls
176 lines (173 loc) · 5.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# Configuration directory.
C := $(shell pwd)
# Home directory.
H := ${HOME}
# Platform. E.g., "Darwin", "Linux".
P := $(shell uname)
# Long hostname, without the trailing domain name, if any.
T := $(shell hostname | cut -d. -f1)
# Short (custom) hostname.
S := $(shell cat ${H}/.hostname-short)
# Add the -n flag for directories, as otherwise, stray symlinks will be created
# inside the C (config) directory itself.
bash:
ln -fs ${C}/bash/.bashrc ${H}
clojure:
ln -fns ${C}/clojure ${H}/.config/clojure
emacs:
git -C ${C} submodule update --init ${C}/emacs/doom-upstream
# Point .emacs.d to upstream doom code.
ln -fns ${C}/emacs/doom-upstream ${H}/.emacs.d
# Make $$DOOMDIR point to our doom-cfg folder.
ln -fns ${C}/emacs/doom-cfg ${H}/.doom.d
# Bring 'doom' script into $$PATH.
cd ${C}/script && ln -fs ../emacs/doom-upstream/bin/doom
ln -sf ${H}/lo/custom-dict.txt ${C}/emacs/spell-fu
git:
ln -fs ${C}/git/cfg.personal.conf ${H}/.gitconfig
ln -fs ${C}/git/gitignore ${H}/.gitignore
ln -fs ${C}/git/sendemail-aliases ${H}/.git-sendemail-aliases
gpg:
ln -fns ${C}/gpg ${H}/.gnupg
ln -fs ${C}/gpg/gpg-agent.nixos.conf ${H}/.gnupg/gpg-agent.conf
jj:
ln -fns ${C}/jj ${H}/.config/jj
karabiner:
mkdir -p ${H}/.config/karabiner
ln -fns ${C}/karabiner/karabiner.json ${H}/.config/karabiner
lesskey:
ln -fs ${C}/lesskey/cfg ${H}/.lesskey
lesskey
melby:
ln -fns ${C}/melby ${H}/.melby
set -e && \
melby_location=$$(readlink $$(which melbyd)) && \
cp -f $${melby_location%/bin/melbyd}/share/melby/sample/* ${H}/.melby
mpd:
ln -fns ${C}/mpd ${H}/.config/mpd
mpv:
ln -fns ${C}/mpv ${H}/.config/mpv
ifeq ('${T}','k0')
ln -fs mpv.${T}.conf mpv/mpv.conf
else ifeq ('${P}','Darwin')
ln -fs mpv.osx.conf mpv/mpv.conf
else
ln -fs mpv.linux.conf mpv/mpv.conf
endif
nix:
ln -fns ${C}/nix ${H}/.config/nix
nixos:
ifeq ('${T}','w0')
ln -fs ${C}/nixos/${T}/configuration.nix /etc/nixos
ln -fs ${C}/nixos/${T}/syschdemd.nix /etc/nixos
ln -fs ${C}/nixos/${T}/syschdemd.sh /etc/nixos
ln -fs ${C}/nixos/${T}/wsl.conf /etc/nixos
ln -fs ${C}/nixos/${T}/hosts /etc
cp -f ${C}/nixos/${T}/resolv.conf /etc
else
ln -fs ${C}/nixos/${T}/configuration.nix /etc/nixos
ln -fs ${C}/nixos/${T}/hardware-configuration.nix /etc/nixos
endif
nixpkgs:
ln -fns ${C}/nixpkgs ${H}/.nixpkgs
notmuch:
ln -fs ${C}/notmuch/notmuch-config ${H}/.notmuch-config
nvim:
ln -fns ${C}/nvim ${H}/.config/nvim
pulse:
rm -rf ${H}/.config/pulse
rm -rf ${H}/.pulse
mkdir -p ${H}/.config/pulse
mkdir ${H}/.pulse
ifeq ('${T}','k0')
cp ${C}/pulse/daemon.conf.k0 ${H}/.config/pulse/daemon.conf
cp ${C}/pulse/default.pa.k0 ${H}/.pulse/default.pa
else
cp ${C}/pulse/default.pa ${H}/.pulse/default.pa
endif
qutebrowser:
ifeq ('${P}','Darwin')
ln -fns ${C}/qutebrowser ${H}/.qutebrowser
else
ln -fns ${C}/qutebrowser ${H}/.config
endif
rtorrent:
ln -fs ${C}/rtorrent/cfg ${H}/.rtorrent.rc
ssh:
ifeq ($(wildcard ~/.ssh/.),)
ln -fns ${C}/ssh ${H}/.ssh
endif
ln -fs ${C}/ssh/config.home.conf ${H}/.ssh/config
terminfo:
git -C ${C} submodule update --init ${C}/wezterm/upstream
tic -x -o ~/.terminfo ${C}/wezterm/upstream/termwiz/data/wezterm.terminfo
tic -x -o ~/.terminfo ${C}/terminfo/xterm-24bit.terminfo
tig:
ln -fs ${C}/tig/.tigrc ${H}
tmux:
ln -fs ${C}/tmux/.tmux.conf ${H}/.tmux.conf
ln -fns ${C}/tmux ${H}/.tmux
uim:
ln -fns ${C}/uim/.uim ${H}/.uim
ln -fns ${C}/uim ${H}/.uim.d
vim:
ln -fns ${C}/vim ${H}/.vim
ln -fs ${C}/vim/cfg ${H}/.vimrc
ln -fs ${C}/vim/cfg ${H}/.gvimrc
vimpc:
ln -fs ${C}/vimpc/.vimpcrc ${H}
wezterm:
ln -fs ${C}/wezterm/.wezterm.lua ${H}
xmonad:
ln -fns ${C}/xmonad ${H}/.xmonad
# xsession is relied on by NixOS hosts that use xmonad (basically the
# default) to start xmonad.
ln -fs ${C}/xmonad/.xsession ${H}/.xsession
zathura:
ln -fns ${C}/zathura ${H}/.config/zathura
zsh:
ln -fns ${C}/zsh ${H}/.zsh
ln -fs ${C}/zsh/.zshenv ${H}
ln -fs ${C}/zsh/.zshrc ${H}
test -f ${C}/zsh/zprofile-${T} \
&& ln -fs ${C}/zsh/zprofile-${T} ${H}/.zprofile || true
test -f ${C}/zsh/zprofile-${S} \
&& ln -fs ${C}/zsh/zprofile-${S} ${H}/.zprofile || true
test -f ${C}/zsh/zlogin-${T} \
&& ln -fs ${C}/zsh/zlogin-${T} ${H}/.zlogin || true
mkdir -p ${H}/.zsh-untracked
git -C ${C} submodule update --init ${C}/zsh/zcomet-upstream
mkdir -p ${C}/zsh/zcomet
ln -fns ${C}/zsh/zcomet ${H}/.zcomet
.PHONY: \
bash \
clojure \
emacs \
git \
gpg \
jj \
karabiner \
lesskey \
melby \
mpd \
mpv \
nix \
nixos \
nixpkgs \
notmuch \
nvim \
pulse \
qutebrowser \
rtorrent \
ssh \
terminfo \
tig \
tmux \
uim \
vim \
vimpc \
wezterm \
xmonad \
xorg \
zathura \
zsh