#!/bin/sh -e un="${1:-sodface}" if [ ! -d /home/${un} ] then echo "Adding user ${un}" adduser ${un} addgroup ${un} audio addgroup ${un} input addgroup ${un} netdev addgroup ${un} video addgroup ${un} wheel fi if ! grep -q sodface.com /etc/apk/repositories then echo "http://www.sodface.com/repo" >> /etc/apk/repositories echo "http://10.0.0.10/repo" >> /etc/apk/repositories wget -O - http://www.sodface.com/repo/sodface-pub-key.tar.gz \ | tar xzvf - -C /etc/apk/keys apk update fi if [ ! -x /usr/bin/herbstluftwm ] then apks=" adwaita-icon-theme font-opensans herbstluftwm mesa-dri-gallium mesa-egl ttf-dejavu " setup-xorg-base ${apks} apks=" alsa-utils alsa-ucm-conf brightnessctl dbus dmenu doas feh firefox mpv nfs-utils pipewire pipewire-alsa pipewire-tools rng-tools sakura util-linux-misc wireplumber " apk add ${apks} echo "permit persist :wheel" >> /etc/doas.d/doas.conf echo "blacklist hci_uart" >> /etc/modprobe.d/blacklist.conf ln -s /usr/bin/herbstclient /usr/bin/hc rc-update add alsa rc-update add dbus rc-update add rngd boot rc-update del networking boot fi tmp=$(mktemp -td cb.XXXXXX) wget -O - http://www.sodface.com/repo/cb/hp-kappa/setup-kappa.tar.gz \ | tar xzvf - -C ${tmp} install -Dm 755 ${tmp}/files/autostart -t /home/${un}/.config/herbstluftwm install -Dm 644 ${tmp}/files/dot-profile /home/${un}/.profile install -Dm 644 ${tmp}/files/dot-xinitrc /home/${un}/.xinitrc install -Dm 644 ${tmp}/files/dot-xserverrc /home/${un}/.xserverrc install -Dm 644 ${tmp}/files/11-modesetting.conf -t /etc/X11/xorg.conf.d install -Dm 644 ${tmp}/files/13-panfrost-swapped-dri-nodes.conf -t /etc/X11/xorg.conf.d install -Dm 644 ${tmp}/files/31-monitor-no-dpms.conf -t /etc/X11/xorg.conf.d install -Dm 644 ${tmp}/files/51-touchpad.conf -t /etc/X11/xorg.conf.d install -Dm 644 ${tmp}/files/HiFi.conf -t /usr/share/alsa/ucm2/conf.d/mt8183_mt6358_t/ install -Dm 644 ${tmp}/files/mt8183_mt6358_t.conf -t /usr/share/alsa/ucm2/conf.d/mt8183_mt6358_t/ install -Dm 644 ${tmp}/wallpaper/* -t /home/${un}/.config/wallpaper chown -R ${un}:${un} /home/${un} rm -rf ${tmp} echo "Done, please reboot."