setup-cockpit/configs.yml

446 lines
13 KiB
YAML

base:
- install:
arch:
- base-devel
- libnotify
- notification-daemon
- numlockx # activate numlock (set in .xinitrc)
- pacman-contrib # for checkupdates, paccache, pacdiff
- pkgfile # get hint on missing package when command not found
- python-pip
- python-setuptools
- reflector
- xorg
- xorg-xinit # enable xinit to avoid having to type 'startx'
debian:
- build-essential
- python3-venv
- python3-pip
- python3-setuptools
both:
- curl
- wget
- xmlstarlet # for clitip
- pandoc # for clitip
- ttf-font-awesome
- ttf-jetbrains-mono
- run:
- sudo ln -rsi dotfiles/dbus/org.freedesktop.Notifications.service /usr/share/dbus-1/services/org.freedesktop.Notifications.service
- run:
- sudo pkgfile -u
sudoers:
- run:
- sudo sed "s/\$USER/$USER/g" dotfiles/sudoers.d/* | sudo tee /etc/sudoers.d/setup-cockpit >/dev/null 2>&1 &&
sudo chmod 600 /etc/sudoers.d/setup-cockpit
pacman.conf:
- run:
- "[ -e /etc/pacman.conf.backup ] || sudo cp /etc/pacman.conf /etc/pacman.conf.backup"
- run:
- sudo sed -i 's/#HookDir/HookDir/' /etc/pacman.conf &&
sudo sed -i 's/#Color/Color/' /etc/pacman.conf &&
sudo sed -i 's/#TotalDownload/TotalDownload/' /etc/pacman.conf &&
sudo sed -i 's/#CheckSpace/CheckSpace/' /etc/pacman.conf &&
sudo sed -i 's/#VerbosePkgLists/VerbosePkgLists/' /etc/pacman.conf
grub:
- install:
- grub-theme-vimix
- run:
- "[ -e /etc/default/grub.backup ] || sudo cp /etc/default/grub /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:
- firefox
- run:
- firefox $(sed -n '/^ http/p' firefox_addons.txt)
tor:
- install:
- torbrowser-launcher
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
- symlink:
- dotfiles/bash/bashrc
- ~/.bashrc
- symlink:
- dotfiles/shell/aliases
- ~/.bash_aliases
- symlink:
- dotfiles/bash/bash_profile
- ~/.bash_profile
- symlink:
- dotfiles/bash/inputrc
- ~/.inputrc
- clone:
- https://github.com/magicmonty/bash-git-prompt.git
- ~/.bash-git-prompt
git:
- install:
- git
- run:
- source ./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.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
- symlink:
- dotfiles/git/ignore
- ~/.config/git/ignore
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
gitleaks:
- run:
command: curl -Lo ~/.local/bin/gitleaks https://github.com/zricethezav/gitleaks/releases/download/v6.2.0/gitleaks-linux-amd64 && chmod +x ~/.local/bin/gitleaks
condition: "[ ! -e ~/.local/bin/gitleaks ] && [ $(uname -m) = 'x86_64' ]"
- run:
command: curl -Lo ~/.local/bin/gitleaks https://github.com/zricethezav/gitleaks/releases/download/v6.2.0/gitleaks-linux-arm && chmod +x ~/.local/bin/gitleaks
condition: "[ ! -e ~/.local/bin/gitleaks ] && [ ! $(uname -m) = 'x86_64' ]"
talisman:
- run:
- curl -o /tmp/install_talisman.bash https://raw.githubusercontent.com/thoughtworks/talisman/master/global_install_scripts/install.bash && /bin/bash /tmp/install_talisman.bash
repos:
- clone:
- git@tunuifranken.info:flyingscorpio/secrets.git
- ~/src/secrets
- symlink:
- ~/src/secrets/setup-cockpit/repos.yml
- ~/setup-cockpit/repos.yml
- include:
- repos.yml
pass:
- install:
- pass
- gnupg
- clone:
- git@tunuifranken.info:flyingscorpio/.password-store.git
- ~/.password-store
- run:
- gpg --import ~/src/secrets/privkey.asc
- symlink:
- dotfiles/gpg/gpg-agent.conf
- ~/.gnupg/gpg-agent.conf
keepass:
- install:
- keepassxc
- clone:
- git@tunuifranken.info:flyingscorpio/keepass.git
- ~/keepass
protonvpn:
- install:
debian:
- openvpn
- dialog
- clone:
url: https://aur.archlinux.org/protonvpn-cli-ng.git
dest: ~/builds/protonvpn-cli-ng
condition: arch
- run:
command: cd ~/builds/protonvpn-cli-ng && makepkg -cirs --needed
condition: arch
- run:
command: sudo pip3 install protonvpn-cli
condition: debian
- run:
- sudo protonvpn init && sudo protonvpn c -f # you will need to add your credentials by hand during init
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: "find /var/lib/mysql -mindepth 1 | read"
i3:
- install:
arch:
- picom
- noto-fonts
debian:
- compton
- fonts-noto
both:
- xdg-user-dirs
- i3-gaps
- i3blocks
- i3lock
- dmenu # launch programs
- 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:
- sysstat
- upower
- symlink:
- dotfiles/i3/blocks
- ~/.config/i3blocks/config
- clone:
- https://github.com/vivien/i3blocks-contrib.git
- ~/git_clones/i3blocks-contrib
- 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:
- dotfiles/i3/scripts/arch_linux_news/arch_linux_news
- ~/.config/i3blocks/scripts/arch_linux_news
- install:
- python-feedparser
- python-matplotlib
- symlink:
- dotfiles/i3/scripts/corona_stats/corona_stats
- ~/.config/i3blocks/scripts/corona_stats
- symlink:
- dotfiles/i3/scripts/crypto
- ~/.config/i3blocks/scripts/crypto
- symlink:
- dotfiles/i3/scripts/protonvpn
- ~/.config/i3blocks/scripts/protonvpn
- 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
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:
- rustc --version || curl https://sh.rustup.rs -sSf | sh
- run:
command: rustup update
condition: update
- run:
command: rustup self update
condition: update
vim:
- install:
arch:
- gvim
- python-pylint
- base-devel
debian:
- vim-gtk
- pylint3
- build-essential
- python3-dev
both:
- flake8
- mypy
- shellcheck
- cmake
- clang
- npm # for coc
- run:
command: /bin/bash ./shellcheck_binary_fix.sh
condition: arch # some Arch derivatives have this problem (arch32, archarm)
- symlink:
- dotfiles/flake8
- ~/.config/flake8
- symlink:
- dotfiles/pylintrc
- ~/.pylintrc
- symlink:
- dotfiles/vim/vimrc
- ~/.vimrc
- symlink:
- dotfiles/vim/colors
- ~/.vim/colors
- run:
command: curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
condition: "[ ! -e ~/.vim/autoload/plug.vim ]"
- run:
- vim +PlugInstall +qall # run this without conditions so it includes added stuff
- run:
command: vim +PlugUpgrade +qall
condition: update
- run:
command: vim +PlugUpdate +qall
condition: update
- run:
command: vim +BlackUpgrade +qall
condition: update
neovim:
- dependency:
- vim
- install:
- neovim
- python-neovim
- run:
- pip install -U neovim-remote --user
- symlink:
- dotfiles/vim/init.vim
- ~/.config/nvim/init.vim
zsh:
- install:
- zsh
- zsh-completions
- zsh-autosuggestions
- zsh-syntax-highlighting
- zsh-theme-powerlevel10k
- symlink:
- dotfiles/zsh/zshrc
- ~/.zshrc
- symlink:
- dotfiles/zsh/zshenv
- ~/.zshenv
- symlink:
- dotfiles/zsh/zprofile
- ~/.zprofile
- symlink:
- dotfiles/zsh/p10k.zsh
- ~/.p10k.zsh
- symlink:
- dotfiles/shell/aliases
- ~/.zsh_aliases
- clone:
- https://github.com/softmoth/zsh-vim-mode.git
- ~/git_clones/zsh-vim-mode
- clone:
url: https://github.com/zsh-users/zsh-autosuggestions.git
dest: ~/git_clones/zsh-autosuggestions
branch: features/redraw-hook
- clone:
url: https://github.com/zsh-users/zsh-syntax-highlighting.git
dest: ~/git_clones/zsh-syntax-highlighting
branch: feature/redrawhook
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
latex:
- install:
arch:
- texlive-most
- texlive-lang
- biber
debian:
- texlive-full
- symlink:
- dotfiles/latexmkrc
- ~/.latexmkrc
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