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.
 
 
 
 
 
 

260 lines
5.4 KiB

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 \
exfat-utils \
fd \
fzf \
gcc-fortran \
gcc-go \
gdb \
gimp \
gimp-plugin-gmic \
git \
gopass \
gparted \
gscan2pdf \
i3-gaps \
imagemagick \
intel-ucode \
jdk8-openjdk \
jsoncpp \
libreoffice-fresh \
lxappearance \
maim \
mpv \
neovim \
network-manager-applet \
networkmanager \
newsboat \
ntp \
openssh \
openvpn \
pandoc \
pandoc-citeproc \
pavucontrol \
pdfpc \
picom \
powertop \
pulseaudio \
pulseaudio-alsa \
pygmentize \
python \
python-pip \
qrencode \
r \
ranger-git \
rsync \
speedtest-cli \
stow \
sxiv \
termite \
texlive-most \
tlp \
tmux \
unclutter \
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 \
entr \
gotop-bin \
i3lock-color \
light \
magnet2torrent-git \
ncpamixer \
nerd-fonts-hack \
networkmanager-dmenu-git \
openvpn-update-systemd-resolved \
plantuml \
python-i3ipc \
python-ueberzug-git \
qutebrowser-git \
sc-im \
skypeforlinux-stable-bin \
ttf-symbola \
tuir \
upass \
urlscan \
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 \
termite \
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