#!/bin/sh set -e if [ "$#" != "1" ]; then echo "No argument supplied" echo "arg1 sudo user pass" exit 1 fi PASS=$1 URI_TAMSYN_FONTS="https://web.archive.org/web/20200616131205if_/http://www.fial.com/~scott/tamsyn-font/download/tamsyn-font-1.11.tar.gz" # btrfs sub list -pacgu / #sudo btrfs subvolume snapshot /data/projects/web1 /data/.snapshots/web1-2020-12-25 #sudo btrfs subvolume list /data #sudo btrfs subvolume show /data/.snapshots/web1-2020-12-25 #update cmdline to previous root snapshot #mkinitcpio -p artix #reboot #mkdir /mnt/btrfs-root #mount -o subvolid=@ /dev/mapper/cryptroot /mnt/btrfs-root #sudo rsync -avz --delete /data/.snapshots/web1-2020-12-25/ /data/projects/web1/ btrfs sub snap / /.btrfs/snapshots/root_$(date +"%Y%m%dT%H%M%S")--init # add wheel group to sudoers sed -i "/^#.*%wheel.*ALL) ALL/s/#.*%wheel/%wheel/g" /etc/sudoers sed -i "/^%wheel.*ALL) ALL/i Defaults:%wheel rootpw" /etc/sudoers # create non root user useradd -m -G wheel -s /bin/bash zaat echo "zaat:${PASS}" | chpasswd # qemu guest agent #pacman -S --noconfirm qemu-guest-agent-runit #ln -s /etc/runit/sv/qemu-guest-agent /run/runit/service/ #pacman -S --noconfirm qemu-guest-agent-openrc #rc-update add qemu-guest-agent boot # install ssh #pacman -S --noconfirm openssh-openrc # install X #pacman -S --noconfirm xorg-server xorg-xinit # xinitrc #cp /etc/X11/xinit/xinitrc /home/zaat/.xinitrc #sed -i "/^twm/d" /home/zaat/.xinitrc #sed -i "/^xclock/d" /home/zaat/.xinitrc #sed -i "/^xterm/d" /home/zaat/.xinitrc #sed -i "/^exec xterm/d" /home/zaat/.xinitrc #echo "openbox-session" >> /home/zaat/.xinitrc # install openbox #pacman -S --noconfirm openbox ttf-liberation xorg-xrandr # openbox config #mkdir -p /home/zaat/.config/openbox #cp -a /etc/xdg/openbox/ /home/zaat/.config/ # ricing #sed -i "s/^#GRUB_COLOR_/GRUB_COLOR_/g" /etc/default/grub #update-grub # ls /usr/share/kbd/consolefonts # showconsolefont # setfont lat2-16 -m #pacman -S --noconfirm tamsyn-font #wget https://aur.archlinux.org/cgit/aur.git/snapshot/tamsyn-font.tar.gz #wget https://web.archive.org/web/20200616131205if_/http://www.fial.com/~scott/tamsyn-font/download/tamsyn-font-1.11.tar.gz wget ${URI_TAMSYN_FONTS} tar xvf tamsyn-font-1.11.tar.gz -C /tmp mv /tmp/tamsyn-font-1.11/*.{pcf,gz} /usr/share/kbd/consolefonts rm tamsyn-font-1.11.tar.gz rm -rf /tmp/tamsyn-font-1.11 echo "FONT=Tamsyn10x20b" >> /etc/vconsole.conf #sed -i "/^consolefont=/c\consolefont=Tamsyn10x20b" /etc/conf.d/consolefont #rc-update add consolefont boot sed -i "/^BINARIES=/c\BINARIES=(setfont)" /etc/mkinitcpio.conf sed -i "/^HOOKS=/c\HOOKS=(base udev autodetect keyboard modconf block encrypt consolefont filesystems fsck)" /etc/mkinitcpio.conf sh -c "mkinitcpio -v --preset artix" #pacman -S --noconfirm obconf # web browsers #pacman -S --noconfirm qutebrowser #firefox # terminal fonts # https://berkeleygraphics.com/typefaces/berkeley-mono/ # https://input.djr.com/ # https://github.com/be5invis/Iosevka # .bash_profile cat < /root/.bash_profile export PS1=' > ' echo 'i do still wrong' EOF # .bash_profile cat < /home/zaat/.bash_profile export PS1='[\u@\h \W]\$ ' export XDG_DATA_HOME="/home/${USER}/.local/share" export XDG_CONFIG_HOME="/home/${USER}/.config" export XDG_CACHE_HOME="/home/${USER}/.cache" export XDG_STATE_HOME="/home/${USER}/.local/state" export XDG_RUNTIME_DIR="/run/user/${UID}" echo 'i say no' EOF # docker #pacman -S docker docker-dinit #dinitctl start dockerd pacman -S podman