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.

261 lines
5.4KB

  1. USER=micah
  2. WALLPAPER=coffeeshop.jpg
  3. .PHONY: install update packages pacman yay arch aur r-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
  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. bemenu \
  41. biber \
  42. ccid \
  43. cmus \
  44. cronie \
  45. ctags \
  46. cups \
  47. cups-pdf \
  48. dhclient \
  49. dunst \
  50. exfat-utils \
  51. fd \
  52. fzf \
  53. gcc-fortran \
  54. gcc-go \
  55. gdb \
  56. gimp \
  57. gimp-plugin-gmic \
  58. git \
  59. gopass \
  60. gparted \
  61. gscan2pdf \
  62. i3-gaps \
  63. imagemagick \
  64. intel-ucode \
  65. jdk8-openjdk \
  66. jsoncpp \
  67. libreoffice-fresh \
  68. lxappearance \
  69. maim \
  70. mpv \
  71. neovim \
  72. network-manager-applet \
  73. networkmanager \
  74. newsboat \
  75. ntp \
  76. openssh \
  77. openvpn \
  78. pandoc \
  79. pandoc-citeproc \
  80. pavucontrol \
  81. pdfpc \
  82. picom \
  83. powertop \
  84. pulseaudio \
  85. pulseaudio-alsa \
  86. pygmentize \
  87. python \
  88. python-pip \
  89. qrencode \
  90. r \
  91. ranger-git \
  92. rsync \
  93. speedtest-cli \
  94. stow \
  95. sxiv \
  96. termite \
  97. texlive-most \
  98. tlp \
  99. tmux \
  100. unclutter \
  101. upower \
  102. vlc \
  103. w3m \
  104. weechat \
  105. wget \
  106. xcape \
  107. xclip \
  108. xdotool \
  109. xorg-server \
  110. xorg-xinit \
  111. xorg-xinput \
  112. xorg-xrandr \
  113. xsettingsd \
  114. xwallpaper \
  115. youtube-dl \
  116. zathura \
  117. zathura-pdf-poppler \
  118. zsh
  119. # start pcscd
  120. systemctl enable pcscd.service
  121. systemctl start pcscd.service
  122. # start tlp
  123. systemctl enable tlp.service
  124. systemctl enable tlp-sleep.service
  125. systemctl start tlp.service
  126. systemctl start tlp-sleep.service
  127. # start cups
  128. systemctl enable org.cups.cupsd.service
  129. systemctl enable cups-browsed.service
  130. systemctl start org.cups.cupsd.service
  131. systemctl start cups-browsed.service
  132. # start cronie
  133. systemctl enable cronie.service
  134. systemctl start cronie.service
  135. # start ntp
  136. systemctl enable ntpd.service
  137. systemctl start ntpd.service
  138. # start ssh
  139. systemctl enable sshd.service
  140. systemctl start sshd.service
  141. # change shell to zsh
  142. chsh -s /bin/zsh $(USER)
  143. aur: yay
  144. # install all aur packages
  145. sudo -u $(USER) yay --noeditmenu --nodiffmenu --removemake --answerclean All -Sy \
  146. antibody \
  147. brother-dcp7065dn \
  148. brscan4 \
  149. cava \
  150. chromium-widevine \
  151. entr \
  152. gotop-bin \
  153. i3lock-color \
  154. light \
  155. magnet2torrent-git \
  156. ncpamixer \
  157. nerd-fonts-hack \
  158. networkmanager-dmenu-git \
  159. openvpn-update-systemd-resolved \
  160. plantuml \
  161. python-i3ipc \
  162. python-ueberzug-git \
  163. qutebrowser-git \
  164. sc-im \
  165. skypeforlinux-stable-bin \
  166. ttf-symbola \
  167. tuir \
  168. upass \
  169. urlscan \
  170. wpgtk-git
  171. r-packages:
  172. Rscript -e "install.packages(c('bindr', 'DiagrammeR', 'knitr', 'reticulate', 'rmarkdown'), repos='https://cran.rstudio.com')"
  173. stow: configs root-config stow-post
  174. configs: stow-pre
  175. # stow personal configs
  176. sudo -u $(USER) stow -S \
  177. bash \
  178. cava \
  179. cmus \
  180. ctags \
  181. documents \
  182. dunst \
  183. fonts \
  184. gnupg \
  185. gtk \
  186. i3 \
  187. mpv \
  188. ncpamixer \
  189. neofetch \
  190. neovim \
  191. networkmanager_dmenu \
  192. newsboat \
  193. pass \
  194. picom \
  195. qutebrowser \
  196. ranger \
  197. readline \
  198. scim \
  199. scripts \
  200. ssh \
  201. systemd \
  202. termite \
  203. tmux \
  204. tuir \
  205. unclutter \
  206. urlview \
  207. weechat \
  208. wpgtk \
  209. xdgopen \
  210. xinit \
  211. zathura \
  212. zsh
  213. hosts:
  214. # move block ips to host file
  215. sed -i '/^# Hosts contributed by Steven Black$$/,$$d' /etc/hosts
  216. cat etc/blockips >> /etc/hosts
  217. sudo:
  218. # copy and start custom sudoers privs
  219. cp etc/sudoers.d/* /etc/sudoers.d/
  220. systemd:
  221. # copy and start custom systemd services
  222. cp etc/systemd/system/* /etc/systemd/system/
  223. systemctl enable wakelock.service
  224. systemctl enable powertop.service
  225. systemctl start wakelock.service
  226. systemctl start powertop.service
  227. root-config: hosts sudo systemd
  228. stow-pre:
  229. # remove configs that will already exist
  230. -[ -L /home/$(USER)/.bashrc ] && mv /home/$(USER)/.bashrc /home/$(USER)/.bashrc.bak
  231. -[ -L /home/$(USER)/.config/cava ] && mv /home/$(USER)/.config/cava /home/$(USER)/.config/cava.bak
  232. -[ -L /home/$(USER)/.config/wpg ] && mv /home/$(USER)/.config/wpg /home/$(USER)/.config/wpg.bak
  233. # create folder that might not be created yet for configs
  234. sudo -u $(USER) mkdir -p /home/$(USER)/.local/share/applications /home/$(USER)/.config/wpg /home/$(USER)/.config/systemd/user/default.target.wants
  235. stow-post:
  236. # shortcuts initialization
  237. sudo -u $(USER) /home/$(USER)/.local/bin/genshortcuts
  238. # neovim vim-plug initialization
  239. sudo -u $(USER) nvim +'PlugInstall --sync' +qa
  240. # set wallpaper and run wpgtk
  241. sudo -u $(USER) cp /home/$(USER)/Pictures/wallpapers/$(WALLPAPER) /home/$(USER)/.config/wall
  242. sudo -u $(USER) wpg -s coffeeshop.jpg