My dotfiles for my Linux rice managed with stow and make
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. USER=micah
  2. WALLPAPER=coffeeshop.jpg
  3. .PHONY: install update packages pacman yay arch aur r-packages pip-packages stow configs hosts sudo systemd root-config stow-pre stow-post
  4. install: packages stow
  5. update:
  6. # fully update git repository
  7. git pull
  8. git submodule update --init --recursive
  9. git submodule update --remote
  10. packages: pacman arch yay aur r-packages pip-packages pamusb
  11. pacman:
  12. # place pacman config
  13. cp etc/pacman.conf /etc/pacman.conf
  14. yay: arch
  15. # install yay aur helper
  16. rm -rf /tmp/yay
  17. sudo -u $(USER) git clone https://aur.archlinux.org/yay.git /tmp/yay
  18. (cd /tmp/yay && sudo -u $(USER) makepkg -si)
  19. rm -rf /tmp/yay
  20. pamusb:
  21. # install dependencies
  22. pacman -Sy --needed --noconfirm \
  23. libxml2 \
  24. python2-gobject \
  25. udisks2
  26. sudo -u $(USER) yay --noeditmenu --nodiffmenu --removemake --answerclean All -Sy \
  27. pmount-safe-removal
  28. # install pamusb
  29. rm -rf /tmp/pamusb
  30. sudo -u $(USER) git clone https://gitlab.com/mehalter/pam_usb.git /tmp/pamusb
  31. (cd /tmp/pamusb && make && make install)
  32. rm -rf /tmp/pamusb
  33. arch: pacman
  34. # create home folders
  35. sudo -u $(USER) mkdir -p /home/$(USER)/Documents /home/$(USER)/Downloads /home/$(USER)/Music /home/$(USER)/Pictures /home/$(USER)/Videos
  36. pacman -Sy --needed --noconfirm \
  37. alsa-utils \
  38. aria2 \
  39. asciinema \
  40. acpi_call \
  41. biber \
  42. bluez \
  43. bluez-libs
  44. compton \
  45. cronie \
  46. ctags \
  47. cups \
  48. cups-pdf \
  49. dhclient \
  50. dmenu \
  51. dunst \
  52. exfat-utils \
  53. fd \
  54. firefox \
  55. fzf \
  56. gcc-fortran \
  57. gdb \
  58. gimp \
  59. gimp-plugin-gmic \
  60. git \
  61. gparted \
  62. gscan2pdf \
  63. i3-gaps \
  64. i3blocks \
  65. imagemagick \
  66. intel-ucode \
  67. jdk8-openjdk \
  68. jsoncpp \
  69. khal \
  70. khard \
  71. libreoffice-fresh \
  72. lxappearance \
  73. maim \
  74. mpv \
  75. msmtp \
  76. neomutt \
  77. neovim \
  78. network-manager-applet \
  79. networkmanager \
  80. newsboat \
  81. notmuch \
  82. notmuch-mutt \
  83. ntp \
  84. offlineimap \
  85. openssh \
  86. openvpn \
  87. pandoc \
  88. pandoc-citeproc \
  89. pass \
  90. pavucontrol \
  91. pdfpc \
  92. powertop \
  93. pulseaudio \
  94. pulseaudio-alsa \
  95. pygmentize \
  96. python \
  97. python-i3-py \
  98. python-pip \
  99. qrencode \
  100. r \
  101. ranger \
  102. rsync \
  103. speedtest-cli \
  104. stow \
  105. sxiv \
  106. terminus-font \
  107. termite \
  108. texlive-most \
  109. tlp \
  110. tmux \
  111. openssh \
  112. unclutter \
  113. upower \
  114. vdirsyncer \
  115. vim \
  116. vlc \
  117. w3m \
  118. weechat \
  119. wget \
  120. xcape \
  121. xclip \
  122. xdotool \
  123. xorg-server \
  124. xorg-xinit \
  125. xorg-xinput \
  126. xorg-xrandr \
  127. xsettingsd \
  128. xwallpaper \
  129. youtube-dl \
  130. zathura \
  131. zathura-pdf-poppler \
  132. zsh
  133. # start tlp
  134. systemctl enable tlp.service
  135. systemctl enable tlp-sleep.service
  136. systemctl start tlp.service
  137. systemctl start tlp-sleep.service
  138. # start cups
  139. systemctl enable org.cups.cupsd.service
  140. systemctl enable cups-browsed.service
  141. systemctl start org.cups.cupsd.service
  142. systemctl start cups-browsed.service
  143. # start cronie
  144. systemctl enable cronie.service
  145. systemctl start cronie.service
  146. # start ntp
  147. systemctl enable ntpd.service
  148. systemctl start ntpd.service
  149. # start ssh
  150. systemctl enable sshd.service
  151. systemctl start sshd.service
  152. # change shell to zsh
  153. chsh -s /bin/zsh $(USER)
  154. aur: yay
  155. # install all aur packages
  156. sudo -u $(USER) yay --noeditmenu --nodiffmenu --removemake --answerclean All -Sy \
  157. antibody \
  158. brother-dcp7065dn \
  159. brscan4 \
  160. cava \
  161. chromium-widevine \
  162. entr \
  163. gotop-bin \
  164. i3lock-color \
  165. light \
  166. magnet2torrent-git \
  167. ncpamixer \
  168. nerd-fonts-inconsolata \
  169. networkmanager-dmenu-git \
  170. openvpn-update-systemd-resolved \
  171. plantuml \
  172. qutebrowser-git \
  173. rtv \
  174. sc-im \
  175. skypeforlinux-stable-bin \
  176. tmuxinator \
  177. ttf-symbola \
  178. upass \
  179. urlscan \
  180. wpgtk-git
  181. r-packages:
  182. Rscript -e "install.packages(c('bindr', 'DiagrammeR', 'knitr', 'reticulate', 'rmarkdown'), repos='https://cran.rstudio.com')"
  183. pip-packages:
  184. sudo -u $(USER) pip install --user --upgrade pip
  185. sudo -u $(USER) pip install --user \
  186. gpymusic
  187. stow: configs root-config stow-post
  188. configs: update stow-pre
  189. # stow personal configs
  190. sudo -u $(USER) stow -S \
  191. bash \
  192. cava \
  193. compton \
  194. ctags \
  195. documents \
  196. dunst \
  197. fonts \
  198. gnupg \
  199. gtk \
  200. i3 \
  201. i3blocks \
  202. khal \
  203. khard \
  204. mpv \
  205. msmtp \
  206. mutt \
  207. ncpamixer \
  208. neofetch \
  209. neovim \
  210. newsboat \
  211. notmuch \
  212. offlineimap \
  213. pass \
  214. qutebrowser \
  215. ranger \
  216. readline \
  217. rtv \
  218. scim \
  219. scripts \
  220. ssh \
  221. systemd \
  222. termite \
  223. tmux \
  224. unclutter \
  225. urlview \
  226. vdirsyncer \
  227. weechat \
  228. wpgtk \
  229. xdgopen \
  230. xinit \
  231. zathura \
  232. zsh
  233. hosts:
  234. # move block ips to host file
  235. sed -i '/^# Hosts contributed by Steven Black$$/,$$d' /etc/hosts
  236. cat etc/blockips >> /etc/hosts
  237. sudo:
  238. # copy and start custom sudoers privs
  239. cp etc/sudoers.d/* /etc/sudoers.d/
  240. systemd:
  241. # copy and start custom systemd services
  242. cp etc/systemd/system/* /etc/systemd/system/
  243. systemctl enable wakelock.service
  244. systemctl enable powertop.service
  245. systemctl start wakelock.service
  246. systemctl start powertop.service
  247. root-config: hosts sudo systemd
  248. stow-pre:
  249. # remove configs that will already exist
  250. -[ -L /home/$(USER)/.bashrc ] && mv /home/$(USER)/.bashrc /home/$(USER)/.bashrc.bak
  251. -[ -L /home/$(USER)/.config/cava ] && mv /home/$(USER)/.config/cava /home/$(USER)/.config/cava.bak
  252. -[ -L /home/$(USER)/.config/wpg ] && mv /home/$(USER)/.config/wpg /home/$(USER)/.config/wpg.bak
  253. # create folder that might not be created yet for configs
  254. sudo -u $(USER) mkdir -p /home/$(USER)/.local/share/applications /home/$(USER)/.config/wpg /home/$(USER)/.config/systemd/user/default.target.wants
  255. stow-post:
  256. # shortcuts initialization
  257. sudo -u $(USER) /home/$(USER)/.config/Scripts/shortcuts.sh
  258. # neovim vim-plug initialization
  259. sudo -u $(USER) nvim +'PlugInstall --sync' +qa
  260. # set wallpaper and run wpgtk
  261. sudo -u $(USER) cp /home/$(USER)/Pictures/wallpapers/$(WALLPAPER) /home/$(USER)/.config/wall
  262. sudo -u $(USER) wpg -s coffeeshop.jpg