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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. USER=micah
  2. WALLPAPER=island.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. pandoc \
  87. pandoc-citeproc \
  88. pass \
  89. pavucontrol \
  90. pdfpc \
  91. powertop \
  92. pulseaudio \
  93. pulseaudio-alsa \
  94. pygmentize \
  95. python \
  96. python-i3-py \
  97. python-pip \
  98. qrencode \
  99. r \
  100. ranger \
  101. rsync \
  102. speedtest-cli \
  103. stow \
  104. sxiv \
  105. terminus-font \
  106. termite \
  107. texlive-most \
  108. tlp \
  109. tmux \
  110. openssh \
  111. unclutter \
  112. upower \
  113. vdirsyncer \
  114. vim \
  115. vlc \
  116. w3m \
  117. weechat \
  118. wget \
  119. xcape \
  120. xclip \
  121. xdotool \
  122. xorg-server \
  123. xorg-xinit \
  124. xorg-xinput \
  125. xorg-xrandr \
  126. xsettingsd \
  127. xwallpaper \
  128. youtube-dl \
  129. zathura \
  130. zathura-pdf-poppler \
  131. zsh
  132. # start tlp
  133. systemctl enable tlp.service
  134. systemctl enable tlp-sleep.service
  135. systemctl start tlp.service
  136. systemctl start tlp-sleep.service
  137. # start cups
  138. systemctl enable org.cups.cupsd.service
  139. systemctl enable cups-browsed.service
  140. systemctl start org.cups.cupsd.service
  141. systemctl start cups-browsed.service
  142. # start cronie
  143. systemctl enable cronie.service
  144. systemctl start cronie.service
  145. # start ntp
  146. systemctl enable ntpd.service
  147. systemctl start ntpd.service
  148. # start ssh
  149. systemctl enable sshd.service
  150. systemctl start sshd.service
  151. # change shell to zsh
  152. chsh -s /bin/zsh $(USER)
  153. aur: yay
  154. # install all aur packages
  155. sudo -u $(USER) yay --noeditmenu --nodiffmenu --removemake --answerclean All -Sy \
  156. antibody \
  157. brother-dcp7065dn \
  158. brscan4 \
  159. cava \
  160. chromium-widevine \
  161. entr \
  162. gotop-bin \
  163. i3lock-color \
  164. light \
  165. magnet2torrent-git \
  166. ncpamixer \
  167. nerd-fonts-inconsolata \
  168. networkmanager-dmenu-git \
  169. qutebrowser-git \
  170. rtv \
  171. sc-im \
  172. skypeforlinux-stable-bin \
  173. tmuxinator \
  174. ttf-symbola \
  175. upass \
  176. urlscan \
  177. wpgtk-git
  178. r-packages:
  179. Rscript -e "install.packages(c('bindr', 'DiagrammeR', 'knitr', 'reticulate', 'rmarkdown'), repos='https://cran.rstudio.com')"
  180. pip-packages:
  181. sudo -u $(USER) pip install --user --upgrade pip
  182. sudo -u $(USER) pip install --user \
  183. gpymusic
  184. stow: configs root-config stow-post
  185. configs: update stow-pre
  186. # stow personal configs
  187. sudo -u $(USER) stow -S \
  188. bash \
  189. cava \
  190. compton \
  191. ctags \
  192. documents \
  193. dunst \
  194. fonts \
  195. gnupg \
  196. gtk \
  197. i3 \
  198. i3blocks \
  199. khal \
  200. khard \
  201. mpv \
  202. msmtp \
  203. mutt \
  204. ncpamixer \
  205. neofetch \
  206. neovim \
  207. newsboat \
  208. notmuch \
  209. offlineimap \
  210. pass \
  211. qutebrowser \
  212. ranger \
  213. readline \
  214. rtv \
  215. scim \
  216. scripts \
  217. ssh \
  218. systemd \
  219. termite \
  220. tmux \
  221. unclutter \
  222. urlview \
  223. vdirsyncer \
  224. weechat \
  225. wpgtk \
  226. xdgopen \
  227. xinit \
  228. zathura \
  229. zsh
  230. hosts:
  231. # move block ips to host file
  232. sed -i '/^# Hosts contributed by Steven Black$$/,$$d' /etc/hosts
  233. cat etc/blockips >> /etc/hosts
  234. sudo:
  235. # copy and start custom sudoers privs
  236. cp etc/sudoers.d/* /etc/sudoers.d/
  237. systemd:
  238. # copy and start custom systemd services
  239. cp etc/systemd/system/* /etc/systemd/system/
  240. systemctl enable wakelock.service
  241. systemctl enable powertop.service
  242. systemctl start wakelock.service
  243. systemctl start powertop.service
  244. root-config: hosts sudo systemd
  245. stow-pre:
  246. # remove configs that will already exist
  247. -[ -L /home/$(USER)/.bashrc ] && mv /home/$(USER)/.bashrc /home/$(USER)/.bashrc.bak
  248. -[ -L /home/$(USER)/.config/cava ] && mv /home/$(USER)/.config/cava /home/$(USER)/.config/cava.bak
  249. -[ -L /home/$(USER)/.config/wpg ] && mv /home/$(USER)/.config/wpg /home/$(USER)/.config/wpg.bak
  250. # create folder that might not be created yet for configs
  251. sudo -u $(USER) mkdir -p /home/$(USER)/.local/share/applications /home/$(USER)/.config/wpg /home/$(USER)/.config/systemd/user/default.target.wants
  252. stow-post:
  253. # shortcuts initialization
  254. sudo -u $(USER) /home/$(USER)/.config/Scripts/shortcuts.sh
  255. # neovim vim-plug initialization
  256. sudo -u $(USER) nvim +'PlugInstall --sync' +qa
  257. # set wallpaper and run wpgtk
  258. sudo -u $(USER) cp /home/$(USER)/Pictures/wallpapers/$(WALLPAPER) /home/$(USER)/.config/wall
  259. sudo -u $(USER) wpg-install -g -i
  260. sudo -u $(USER) wpg -s island.jpg