USER=micah
|
|
WALLPAPER=coffeeshop.jpg
|
|
|
|
.PHONY: install update packages pacman yay arch aur r-packages stow configs hosts sudo systemd root-config stow-pre stow-post
|
|
|
|
install: packages stow
|
|
|
|
update:
|
|
# fully update git repository
|
|
git pull
|
|
git submodule update --init --recursive
|
|
git submodule update --remote
|
|
|
|
packages: pacman arch yay aur r-packages
|
|
|
|
pacman:
|
|
# place pacman config
|
|
cp etc/pacman.conf /etc/pacman.conf
|
|
|
|
yay: arch
|
|
# install yay aur helper
|
|
rm -rf /tmp/yay
|
|
sudo -u $(USER) git clone https://aur.archlinux.org/yay.git /tmp/yay
|
|
(cd /tmp/yay && sudo -u $(USER) makepkg -si)
|
|
rm -rf /tmp/yay
|
|
|
|
pamusb:
|
|
# install dependencies
|
|
pacman -Sy --needed --noconfirm \
|
|
libxml2 \
|
|
python2-gobject \
|
|
udisks2
|
|
sudo -u $(USER) yay --noeditmenu --nodiffmenu --removemake --answerclean All -Sy \
|
|
pmount-safe-removal
|
|
# install pamusb
|
|
rm -rf /tmp/pamusb
|
|
sudo -u $(USER) git clone https://gitlab.com/mehalter/pam_usb.git /tmp/pamusb
|
|
(cd /tmp/pamusb && make && make install)
|
|
rm -rf /tmp/pamusb
|
|
|
|
arch: pacman
|
|
# create home folders
|
|
sudo -u $(USER) mkdir -p /home/$(USER)/Documents /home/$(USER)/Downloads /home/$(USER)/Music /home/$(USER)/Pictures /home/$(USER)/Videos
|
|
pacman -Sy --needed --noconfirm \
|
|
alsa-utils \
|
|
aria2 \
|
|
asciinema \
|
|
bemenu \
|
|
biber \
|
|
ccid \
|
|
cmus \
|
|
cronie \
|
|
ctags \
|
|
cups \
|
|
cups-pdf \
|
|
dhclient \
|
|
dunst \
|
|
entr \
|
|
exfat-utils \
|
|
fd \
|
|
fzf \
|
|
gcc-fortran \
|
|
gcc-go \
|
|
gdb \
|
|
gimp \
|
|
gimp-plugin-gmic \
|
|
git \
|
|
gopass \
|
|
gparted \
|
|
gscan2pdf \
|
|
i3-gaps \
|
|
i3lock-color \
|
|
imagemagick \
|
|
intel-ucode \
|
|
jdk8-openjdk \
|
|
jsoncpp \
|
|
kitty \
|
|
libreoffice-fresh \
|
|
light \
|
|
lxappearance \
|
|
maim \
|
|
mpv \
|
|
neovim \
|
|
network-manager-applet \
|
|
networkmanager \
|
|
newsboat \
|
|
ntp \
|
|
openssh \
|
|
openvpn \
|
|
pandoc \
|
|
pandoc-citeproc \
|
|
pavucontrol \
|
|
pdfpc \
|
|
picom \
|
|
plantuml \
|
|
powertop \
|
|
pulseaudio \
|
|
pulseaudio-alsa \
|
|
pygmentize \
|
|
python \
|
|
python-i3ipc \
|
|
python-pip \
|
|
qrencode \
|
|
qutebrowser \
|
|
r \
|
|
ranger-git \
|
|
rsync \
|
|
speedtest-cli \
|
|
stow \
|
|
sxiv \
|
|
termite \
|
|
texlive-most \
|
|
tlp \
|
|
tmux \
|
|
unclutter \
|
|
urlscan \
|
|
upower \
|
|
vlc \
|
|
w3m \
|
|
weechat \
|
|
wget \
|
|
xcape \
|
|
xclip \
|
|
xdotool \
|
|
xorg-server \
|
|
xorg-xinit \
|
|
xorg-xinput \
|
|
xorg-xrandr \
|
|
xsettingsd \
|
|
xwallpaper \
|
|
youtube-dl \
|
|
zathura \
|
|
zathura-pdf-poppler \
|
|
zsh
|
|
# start pcscd
|
|
systemctl enable pcscd.service
|
|
systemctl start pcscd.service
|
|
# start tlp
|
|
systemctl enable tlp.service
|
|
systemctl enable tlp-sleep.service
|
|
systemctl start tlp.service
|
|
systemctl start tlp-sleep.service
|
|
# start cups
|
|
systemctl enable org.cups.cupsd.service
|
|
systemctl enable cups-browsed.service
|
|
systemctl start org.cups.cupsd.service
|
|
systemctl start cups-browsed.service
|
|
# start cronie
|
|
systemctl enable cronie.service
|
|
systemctl start cronie.service
|
|
# start ntp
|
|
systemctl enable ntpd.service
|
|
systemctl start ntpd.service
|
|
# start ssh
|
|
systemctl enable sshd.service
|
|
systemctl start sshd.service
|
|
# change shell to zsh
|
|
chsh -s /bin/zsh $(USER)
|
|
|
|
aur: yay
|
|
# install all aur packages
|
|
sudo -u $(USER) yay --noeditmenu --nodiffmenu --removemake --answerclean All -Sy \
|
|
antibody \
|
|
brother-dcp7065dn \
|
|
brscan4 \
|
|
cava \
|
|
chromium-widevine \
|
|
gotop-bin \
|
|
magnet2torrent-git \
|
|
ncpamixer \
|
|
networkmanager-dmenu-git \
|
|
openvpn-update-systemd-resolved \
|
|
sc-im \
|
|
skypeforlinux-stable-bin \
|
|
tuir \
|
|
upass \
|
|
wpgtk-git
|
|
|
|
r-packages:
|
|
Rscript -e "install.packages(c('bindr', 'DiagrammeR', 'knitr', 'reticulate', 'rmarkdown'), repos='https://cran.rstudio.com')"
|
|
|
|
stow: configs root-config stow-post
|
|
|
|
configs: stow-pre
|
|
# stow personal configs
|
|
sudo -u $(USER) stow -S \
|
|
bash \
|
|
cava \
|
|
cmus \
|
|
ctags \
|
|
documents \
|
|
dunst \
|
|
fonts \
|
|
gnupg \
|
|
gtk \
|
|
i3 \
|
|
mpv \
|
|
ncpamixer \
|
|
neofetch \
|
|
neovim \
|
|
networkmanager_dmenu \
|
|
newsboat \
|
|
pass \
|
|
picom \
|
|
qutebrowser \
|
|
ranger \
|
|
readline \
|
|
scim \
|
|
scripts \
|
|
ssh \
|
|
systemd \
|
|
tmux \
|
|
tuir \
|
|
unclutter \
|
|
urlview \
|
|
weechat \
|
|
wpgtk \
|
|
xdgopen \
|
|
xinit \
|
|
zathura \
|
|
zsh
|
|
|
|
hosts:
|
|
# move block ips to host file
|
|
sed -i '/^# Hosts contributed by Steven Black$$/,$$d' /etc/hosts
|
|
cat etc/blockips >> /etc/hosts
|
|
|
|
sudo:
|
|
# copy and start custom sudoers privs
|
|
cp etc/sudoers.d/* /etc/sudoers.d/
|
|
|
|
systemd:
|
|
# copy and start custom systemd services
|
|
cp etc/systemd/system/* /etc/systemd/system/
|
|
systemctl enable wakelock.service
|
|
systemctl enable powertop.service
|
|
systemctl start wakelock.service
|
|
systemctl start powertop.service
|
|
|
|
root-config: hosts sudo systemd
|
|
|
|
stow-pre:
|
|
# remove configs that will already exist
|
|
-[ -L /home/$(USER)/.bashrc ] && mv /home/$(USER)/.bashrc /home/$(USER)/.bashrc.bak
|
|
-[ -L /home/$(USER)/.config/cava ] && mv /home/$(USER)/.config/cava /home/$(USER)/.config/cava.bak
|
|
-[ -L /home/$(USER)/.config/wpg ] && mv /home/$(USER)/.config/wpg /home/$(USER)/.config/wpg.bak
|
|
# create folder that might not be created yet for configs
|
|
sudo -u $(USER) mkdir -p /home/$(USER)/.local/share/applications /home/$(USER)/.config/wpg /home/$(USER)/.config/systemd/user/default.target.wants
|
|
|
|
stow-post:
|
|
# shortcuts initialization
|
|
sudo -u $(USER) /home/$(USER)/.local/bin/genshortcuts
|
|
# neovim vim-plug initialization
|
|
sudo -u $(USER) nvim +'PlugInstall --sync' +qa
|
|
# set wallpaper and run wpgtk
|
|
sudo -u $(USER) cp /home/$(USER)/Pictures/wallpapers/$(WALLPAPER) /home/$(USER)/.config/wall
|
|
sudo -u $(USER) wpg -s coffeeshop.jpg
|