setup-cockpit/configs.yml

497 lines
16 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

sudoers:
- run:
- sudo sed "s/\$USER/$USER/g" $(ls dotfiles/sudoers.d/* | grep -v -e arch -e debian) | sudo tee /etc/sudoers.d/setup-cockpit >/dev/null 2>&1
- run:
command: sudo sed "s/\$USER/$USER/g" dotfiles/sudoers.d/*.arch | sudo tee -a /etc/sudoers.d/setup-cockpit >/dev/null 2>&1
condition: arch
- run:
command: sudo sed "s/\$USER/$USER/g" dotfiles/sudoers.d/*.debian | sudo tee -a /etc/sudoers.d/setup-cockpit >/dev/null 2>&1
condition: debian
- run:
- sudo chmod 600 /etc/sudoers.d/setup-cockpit
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
firefox:
- install:
arch:
- firefox
debian:
- firefox-esr
- run:
- firefox $(sed -n '/^ http/p' firefox_addons.txt)
terminator:
- install:
- terminator
- symlink:
- dotfiles/terminator/config
- ~/.config/terminator/config
- symlink:
- dotfiles/terminator/profiles
- ~/.config/terminator/profiles
kitty:
- install:
- kitty
- symlink:
- dotfiles/kitty.conf
- ~/.config/kitty/kitty.conf
- clone:
- https://github.com/dexpota/kitty-themes.git
- ~/.git_clones/kitty-themes
- symlink:
- ~/.git_clones/kitty-themes/themes/gruvbox_dark.conf
- ~/.config/kitty/theme.conf
bash:
- install:
- bash-completion
- run:
- content='. "$HOME"/setup-cockpit/dotfiles/bash/bash_profile'; grep "$content" "$HOME"/.bash_profile >/dev/null 2>&1 || echo "$content" >> "$HOME"/.bash_profile
- run:
- content='. "$HOME"/setup-cockpit/dotfiles/bash/bashrc'; grep "$content" "$HOME"/.bashrc >/dev/null 2>&1 || echo "$content" >> "$HOME"/.bashrc
- symlink:
- dotfiles/bash/inputrc
- ~/.inputrc
- clone:
- https://github.com/magicmonty/bash-git-prompt.git
- ~/.bash-git-prompt
git:
- install:
- git
- run:
- . ./secrets &&
git config --global user.name "${USER}@$(uname -n)";
git config --global user.email "$GIT_EMAIL";
git config --global pull.rebase false;
git config --global alias.br "branch";
git config --global alias.ci "commit";
git config --global alias.co "checkout";
git config --global alias.cp "cherry-pick";
git config --global alias.st "status";
git config --global alias.logadog "log --all --decorate --oneline --graph";
git config --global alias.chlog "log --no-merges --oneline --stat @{1}..";
git config --global alias.df "diff --word-diff=color";
git config --global diff.tool vimdiff;
git config --global init.defaultBranch "main"
- symlink:
- dotfiles/git/ignore
- ~/.config/git/ignore
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"
git-summary:
- clone:
- https://gitlab.com/lordadamson/git-summary.git
- ~/.git_clones/git-summary
- symlink:
- ~/.git_clones/git-summary/git-summary
- ~/.local/bin/git-summary
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
pass:
- install:
- pass
- gnupg
- clone:
url: git@tunuifranken.info:flyingscorpio/.password-store.git
dest: ~/.password-store
branch: main
- symlink:
- dotfiles/gpg/gpg-agent.conf
- ~/.gnupg/gpg-agent.conf
- run:
command: sudo cp /usr/share/doc/pass/examples/dmenu/passmenu /usr/bin
condition: debian
- run:
- sudo cp /usr/bin/passmenu /usr/bin/passmenu-url &&
sudo sed -i "s/pass show -c/pass show -c2/g" /usr/bin/passmenu-url;
sudo cp /usr/bin/passmenu /usr/bin/passmenu-user &&
sudo sed -i "s/pass show -c/pass show -c3/g" /usr/bin/passmenu-user
keepass:
- install:
- keepassxc
- clone:
- git@tunuifranken.info:flyingscorpio/keepass.git
- ~/keepass
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"
i3:
- install:
arch:
- noto-fonts
- i3-gaps
- dmenu # launch programs
debian:
- fonts-noto
- i3-wm
- suckless-tools
both:
- picom
- xdg-user-dirs
- i3lock
- xsettingsd
- lxappearance
- scrot # enable screenshot with Printscreen
- viewnior
- hsetroot
- symlink:
- dotfiles/i3/config
- ~/.config/i3/config
- clone:
- https://github.com/addy-dclxvi/i3-starterpack.git
- ~/.git_clones/i3-starterpack
- symlink:
- dotfiles/xinitrc
- ~/.xinitrc
- symlink:
- dotfiles/xserverrc
- ~/.xserverrc
- symlink:
- dotfiles/Xresources
- ~/.Xresources
- symlink:
- dotfiles/xsettingsd
- ~/.xsettingsd
- symlink:
- dotfiles/picom.conf
- ~/.config/picom.conf
- symlink:
- dotfiles/picom.conf
- ~/.config/compton.conf
- symlink:
- ~/.git_clones/i3-starterpack/.fonts/icomoon/feather.ttf
- ~/.fonts/icomoon/feather.ttf
- run:
- fc-cache -fv
- run:
- xdg-user-dirs-update
i3blocks:
- install:
arch:
- python-feedparser
- python-matplotlib
- i3blocks
debian:
- libstartup-notification0-dev # build dependency
- python3-matplotlib
both:
- sysstat
- upower
- clone:
url: https://github.com/vivien/i3blocks.git
dest: ~/.git_clones/i3blocks
branch: master
condition: debian
- run:
command: cd ~/.git_clones/i3blocks &&
./autogen.sh &&
./configure &&
make &&
sudo make install
condition: debian
- symlink:
- dotfiles/i3/blocks
- ~/.config/i3blocks/config
- clone:
- https://github.com/vivien/i3blocks-contrib.git
- ~/.git_clones/i3blocks-contrib
- symlink:
- dotfiles/i3/scripts/nagstamon
- ~/.config/i3blocks/scripts/nagstamon
- symlink:
src: ~/.git_clones/i3blocks-contrib/apt-upgrades/apt-upgrades
dest: ~/.config/i3blocks/scripts/apt-upgrades
condition: debian
- symlink:
src: ~/.git_clones/i3blocks-contrib/arch-update/arch-update
dest: ~/.config/i3blocks/scripts/arch-update
condition: arch
- symlink:
src: dotfiles/i3/scripts/arch_linux_news/arch_linux_news
dest: ~/.config/i3blocks/scripts/arch_linux_news
condition: arch
- symlink:
- dotfiles/i3/scripts/battery
- ~/.config/i3blocks/scripts/battery
- symlink:
- dotfiles/i3/scripts/corona_stats/corona_stats
- ~/.config/i3blocks/scripts/corona_stats
- symlink:
- dotfiles/i3/scripts/crypto
- ~/.config/i3blocks/scripts/crypto
- symlink:
- ~/.git_clones/i3blocks-contrib/calendar/calendar
- ~/.config/i3blocks/scripts/calendar
- symlink:
- ~/.git_clones/i3blocks-contrib/temperature/temperature
- ~/.config/i3blocks/scripts/temperature
- symlink:
- ~/.git_clones/i3blocks-contrib/cpu_usage/cpu_usage
- ~/.config/i3blocks/scripts/cpu_usage
- symlink:
- dotfiles/i3/scripts/free_disk_space
- ~/.config/i3blocks/scripts/free_disk_space
- symlink:
- dotfiles/i3/scripts/pub-ip
- ~/.config/i3blocks/scripts/pub-ip
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
zsh:
- install:
arch:
- zsh-theme-powerlevel10k
debian:
- zsh-theme-powerlevel9k
both:
- zsh
- zsh-completions
- zsh-autosuggestions
- zsh-syntax-highlighting
- run:
- content='. "$HOME"/setup-cockpit/dotfiles/zsh/zshrc'; grep "$content" "$HOME"/.zshrc >/dev/null 2>&1 || echo "$content" >> "$HOME"/.zshrc
- run:
- content='. "$HOME"/setup-cockpit/dotfiles/zsh/zshenv'; grep "$content" "$HOME"/.zshenv >/dev/null 2>&1 || echo "$content" >> "$HOME"/.zshenv
- run:
- content='. "$HOME"/setup-cockpit/dotfiles/zsh/zprofile'; grep "$content" "$HOME"/.zprofile >/dev/null 2>&1 || echo "$content" >> "$HOME"/.zprofile
- run:
- content='. "$HOME"/setup-cockpit/dotfiles/zsh/p10k.zsh'; grep "$content" "$HOME"/.p10k.zsh >/dev/null 2>&1 || echo "$content" >> "$HOME"/.p10k.zsh
- clone:
url: https://github.com/softmoth/zsh-vim-mode.git
dest: ~/.git_clones/zsh-vim-mode
branch: main
- clone:
url: https://github.com/zsh-users/zsh-autosuggestions.git
dest: ~/.git_clones/zsh-autosuggestions
branch: master
- clone:
url: https://github.com/zsh-users/zsh-syntax-highlighting.git
dest: ~/.git_clones/zsh-syntax-highlighting
branch: master
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
latex:
- install:
arch:
- texlive-most
- texlive-lang
- biber
debian:
- texlive-full
- symlink:
- dotfiles/latexmkrc
- ~/.latexmkrc
lilypond:
- install:
- lilypond
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