75 lines
2.4 KiB
Bash
75 lines
2.4 KiB
Bash
#!/bin/sh
|
|
set -e
|
|
alias log='echo [post_install.sh]'
|
|
|
|
|
|
ROOT=/mnt/archinstall
|
|
|
|
|
|
log "clearing caches"
|
|
rm -fr "$ROOT/var/cache/"
|
|
|
|
|
|
log "altering linux confs"
|
|
cp content/sudoers "$ROOT/etc/sudoers"
|
|
cp content/pacman.conf "$ROOT/etc/pacman.conf"
|
|
|
|
|
|
log "configuring network"
|
|
mkdir -p "$ROOT/etc/systemd/network"
|
|
cp content/wired.network "$ROOT/etc/systemd/network/20-wired.network"
|
|
echo "
|
|
sudo systemctl enable systemd-networkd.service
|
|
sudo systemctl enable systemd-resolved.service
|
|
" | arch-chroot "$ROOT" su user
|
|
|
|
|
|
log "installing paru"
|
|
echo "
|
|
cd /tmp
|
|
git clone https://aur.archlinux.org/paru-bin.git
|
|
cd paru-bin
|
|
makepkg -si
|
|
" | arch-chroot "$ROOT" su user
|
|
cp content/paru.conf "$ROOT/etc/paru.conf"
|
|
|
|
|
|
log "installing extra packages"
|
|
echo "
|
|
paru -Sy --noconfirm tealdeer nnn-nerd ttf-ms-fonts discord visual-studio-code-bin
|
|
" | arch-chroot "$ROOT" su user
|
|
|
|
|
|
log "configuring extra packages"
|
|
echo '
|
|
sudo systemctl enable lightdm.service
|
|
opam init --yes
|
|
' | arch-chroot "$ROOT" su user
|
|
|
|
|
|
log "configuring home"
|
|
echo '
|
|
cd
|
|
sudo chsh --shell=/bin/zsh user
|
|
true | sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
|
|
' | arch-chroot "$ROOT" su user
|
|
|
|
|
|
cp -r content/home/* content/home/.* "$ROOT/home/user/"
|
|
echo '
|
|
cd
|
|
sudo chown -R user:user .
|
|
' | arch-chroot "$ROOT" su user
|
|
echo '
|
|
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
|
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
|
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
|
' | arch-chroot -u user "$ROOT" zsh
|
|
|
|
|
|
echo '
|
|
for ext in eamodio.gitlens Equinusocio.vsc-community-material-theme Equinusocio.vsc-material-theme equinusocio.vsc-material-theme-icons ms-dotnettools.csharp ms-python.isort ms-python.python ms-python.vscode-pylance ms-vscode.cpptools ocamllabs.ocaml-platform rust-lang.rust-analyzer usernamehw.errorlens VisualStudioExptTeam.intellicode-api-usage-examples VisualStudioExptTeam.vscodeintellicode
|
|
do code --install-extension $ext
|
|
done
|
|
|
|
' | arch-chroot "$ROOT" su user
|