#!/bin/sh mkdir ~/docs/ mkdir ~/dl/ mkdir ~/media/ mkdir -p ~/.local/share/gnupg/ mkdir -p ~/.config/mpd/playlists mkdir -p ~/.local/share/desktop if [ "$UFW_CONFIG" ]; then sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw allow http sudo ufw allow https #sudo ufw allow ssh sudo ufw allow ntp sudo ufw allow 67:68/tcp sudo ufw allow 53 #allow torrent client traffic sudo ufw allow 56881:56889/tcp #rules to allow steam sudo ufw allow 27000:27036/udp sudo ufw allow 27036:27037/tcp sudo ufw allow 4380/udp sudo ufw enable fi #install zsh shell chsh -s /bin/zsh "$USER" #setup .zprofile and zsh history file cd ~ || return ln -s ~/.profile ~/.zprofile mkdir -p ~/.cache/zsh touch ~/.cache/zsh/history #replace sudo with doas echo "installing doas, symlinking to sudo, and UNINSTALLING SUDO. sudo is uninstalled using doas so permissions should be setup right if you are able to uninstall. (y/N)" read input if [ "$input" = "y" ]; then echo "permit persist $USER as root" >> ~/.cache/doas.conf sudo cp ~/.cache/doas.conf /etc/doas.conf rm ~/.cache/doas.conf doas pacman -R sudo && doas ln -s /bin/doas /bin/sudo #TODO ARCH SPECIFIC fi #set limits for esync sudo sh -c "echo '$USER hard nofile 524288' >> /etc/security/limits.conf" #set limits for monero sudo sh -c "echo '$USER hard memlock 2048' >> /etc/security/limits.conf" sudo sh -c "echo '$USER hard memlock 2048' >> /etc/security/limits.conf" sudo groupadd nogroup #needed to use slock ### modify udevil config to add exec to mount options #sudo sed -i 's/^allowed_options .*$/&, exec/g' /etc/udevil/udevil.conf ### change dns to opendns for porn blocking #sudo sh -c 'echo "static domain_name_servers=208.67.222.123 208.67.220.123" >> /etc/dhcpcd.conf' ### change dns to dns.watch, free speech dns #sudo sh -c 'echo "static domain_name_servers=84.200.69.80 84.200.70.40 2001:1608:10:25::1c04:b12f 2001:1608:10:25::9249:d69b" >> /etc/dhcpcd.conf' #fix issue with arduino ide and tiling wms sudo sh -c 'echo "export _JAVA_AWT_WM_NONREPARENTING=1" >> /etc/profile.d/jre.sh' #set console terminal font sudo sh -c 'echo "FONT=Lat2-Terminus16" >> /etc/vconsole.conf' #set grub theme sudo sed -i 's/#GRUB_COLOR_NORMAL/GRUB_COLOR_NORMAL/g' /etc/default/grub sudo sed -i 's/#GRUB_COLOR_HIGHLIGHT/GRUB_COLOR_HIGHLIGHT/g' /etc/default/grub #symlink vim to neovim sudo ln -s /bin/nvim /bin/vim #download collapse OS mkdir -p "$HOME"/.local/src/ cd "$HOME"/.local/src/ wget http://collapseos.org/files/collapseos-latest.tar.gz cd - #set wallpaper ln -s ~/media/img/wallpapers/alena-aenami-eclipse-1k.jpg ~/.config/wall #link Xresources for xwayland ln -s ~/.config/Xresources ~/.Xdefaults #set /tmp to tmpfs sudo sh -c 'echo "tmpfs /tmp tmpfs rw,nodev,nosuid,size=2G 0 0" >> /etc/fstab'