setup-cockpit/configs.yml

213 lines
6.8 KiB
YAML

grub:
- install:
arch:
- grub-theme-vimix
- run:
command: sudo cp /etc/default/grub /etc/default/grub.backup
condition: "[ ! -e /etc/default/grub.backup ]"
- run:
- sudo sed -i -E 's/^#?GRUB_DEFAULT.+/GRUB_DEFAULT=saved/' /etc/default/grub &&
sudo sed -i -E 's@^#?GRUB_THEME.+@GRUB_THEME="/usr/share/grub/themes/Vimix/theme.txt"@' /etc/default/grub &&
sudo sed -i -E 's/^#?GRUB_SAVEDEFAULT.+/GRUB_SAVEDEFAULT=true/' /etc/default/grub &&
sudo sed -i -E 's/^#?GRUB_DISABLE_SUBMENU.+/GRUB_DISABLE_SUBMENU=y/' /etc/default/grub &&
sudo grub-mkconfig -o /boot/grub/grub.cfg
etckeeper:
- install:
- etckeeper
- run:
- sudo git config --global user.name "root@$(uname -n)";
sudo git config --global user.email "root@$(uname -n)";
sudo git config --global init.defaultBranch "main"
- run:
command: sudo etckeeper init
condition: "[ ! -d /etc/.git ]"
- run:
- sudo etckeeper commit "First commit"
repos:
- clone:
url: git@tunuifranken.info:flyingscorpio/secrets.git
dest: ~/src/secrets
branch: main
- symlink:
- ~/src/secrets/setup-cockpit/repos.yml
- ~/setup-cockpit/repos.yml
- include:
- repos.yml
protonvpn:
- install:
- openvpn
- clone:
url: https://aur.archlinux.org/openvpn-update-systemd-resolved.git
dest: ~/builds/openvpn-update-systemd-resolved
condition: arch
- run:
command: cd ~/builds/openvpn-update-systemd-resolved && makepkg -cirs --needed
condition: arch
- run:
- sudo cp ~/src/secrets/setup-cockpit/protonvpn_confs/*.conf /etc/openvpn/client/
- run:
- sudo cp ~/src/secrets/setup-cockpit/protonvpn_confs/pvpn.auth /etc/openvpn/client/
- run:
- sudo systemctl enable openvpn-client@fr.protonvpn.com.udp.service
mariadb:
- install:
- mariadb
- run:
command: sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql && sudo systemctl start mysqld.service && sudo mysql_secure_installation
condition: "sudo find /var/lib/mysql -mindepth 1 | read"
markdown viewer:
- write:
- ~/.local/share/mime/packages/text-markdown.xml
- |
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="text/plain">
<glob pattern="*.md"/>
<glob pattern="*.mkd"/>
<glob pattern="*.markdown"/>
</mime-type>
</mime-info>
- run:
- update-mime-database ~/.local/share/mime
rust:
- run:
command: rustup self uninstall
condition: "[ -e ~/.cargo ]"
- install:
- rustup
- run:
- rustup default stable
java:
- install:
- jdk-openjdk
pacman_hooks:
- run:
- sudo mkdir -p /etc/pacman.d/hooks
- run:
command: sudo ln -rsi dotfiles/pacman_hooks/borg_backup.hook /etc/pacman.d/hooks/borg_backup.hook
condition: "[[ $(uname -n) = 'arch-desktop' ]]"
- run:
- sudo ln -rsi dotfiles/pacman_hooks/new_orphan.hook /etc/pacman.d/hooks/new_orphan.hook
- run:
- sudo ln -rsi dotfiles/pacman_hooks/pacdiff.hook /etc/pacman.d/hooks/pacdiff.hook
- run:
- sudo ln -rsi dotfiles/pacman_hooks/mirrorupgrade.hook /etc/pacman.d/hooks/mirrorupgrade.hook
- run:
- sudo ln -rsi dotfiles/pacman_hooks/paccache.hook /etc/pacman.d/hooks/paccache.hook
rsync_backup:
- run:
- sudo ln -rsi dotfiles/systemd/rsync_backup.timer /etc/systemd/system/rsync_backup.timer
- run:
- sudo ln -rsi dotfiles/systemd/rsync_backup.service /etc/systemd/system/rsync_backup.service
- run:
- sudo systemctl enable rsync_backup.timer
- symlink:
- ~/src/secrets/setup-cockpit/rsync_backup_excludes
- ~/setup-cockpit/rsync_backup_excludes
gitea_backup_rsync:
- run:
- sudo ln -rsi dotfiles/systemd/gitea_backup_rsync.timer /etc/systemd/system/gitea_backup_rsync.timer
- run:
- sudo ln -rsi dotfiles/systemd/gitea_backup_rsync.service /etc/systemd/system/gitea_backup_rsync.service
- run:
- sudo systemctl enable gitea_backup_rsync.timer
powershell:
- clone:
url: https://aur.archlinux.org/powershell-bin.git
dest: ~/builds/powershell-bin
condition: arch
- run:
command: cd ~/builds/powershell-bin && makepkg -cirs --needed
condition: arch
gaming:
- run:
command: sudo cp /etc/pacman.conf /etc/pacman.conf.backup
condition: "[ ! -e /etc/pacman.conf.backup ]"
- run:
- 'LINESTART=$(grep -n "\[multilib\]" /etc/pacman.conf | cut -d: -f1 | head -n1); LINEEND=$((LINESTART+1)); sudo sed -i "${LINESTART},${LINEEND} s/^#//" /etc/pacman.conf'
- install:
- wine-staging
- winetricks
- lutris
- steam
- gamemode
- giflib
- lib32-giflib
- libpng
- lib32-libpng
- libldap
- lib32-libldap
- gnutls
- lib32-gnutls
- mpg123
- lib32-mpg123
- openal
- lib32-openal
- v4l-utils
- lib32-v4l-utils
- libpulse
- lib32-libpulse
- libgpg-error
- lib32-libgpg-error
- alsa-plugins
- lib32-alsa-plugins
- alsa-lib
- lib32-alsa-lib
- libjpeg-turbo
- lib32-libjpeg-turbo
- sqlite
- lib32-sqlite
- libxcomposite
- lib32-libxcomposite
- libxinerama
- lib32-libxinerama
- libgcrypt
- lib32-libgcrypt
- ncurses
- lib32-ncurses
- opencl-icd-loader
- lib32-opencl-icd-loader
- libxslt
- lib32-libxslt
- libva
- lib32-libva
- gtk3
- lib32-gtk3
- gst-plugins-base-libs
- lib32-gst-plugins-base-libs
- vulkan-icd-loader
- lib32-vulkan-icd-loader
libvirt:
- install:
arch:
- libvirt
- iptables-nft
- dnsmasq
- dmidecode
- virt-install
- virt-viewer
- qemu-headless
- run:
- sudo usermod -aG libvirt "${USER}"
- run:
- 'grep "libvirt libvirt_guest" /etc/nsswitch.conf >/dev/null 2>&1 || sudo sed -i -E "s/^hosts: (.+)/hosts: libvirt libvirt_guest \1/" /etc/nsswitch.conf'
- run:
- sudo systemctl start libvirtd.service && sudo systemctl enable libvirtd.service
- run:
- virsh pool-define-as libvirt-pool dir - - - - "/home/${USER}/.local/libvirt/images";
virsh pool-build libvirt-pool &&
virsh pool-start libvirt-pool &&
virsh pool-autostart libvirt-pool