Note: this repository needs to be cleaned up and refactored. There are many roles and playbooks that are not used anymore, and some of them are not even working. I'm planning to do this in the nearest future. Don't use this repository as a reference for now.
This repository contains playbooks and roles, that I use to:
- Configure my local development environment, from wallpapers and keyboard shortcuts to byobu and VSCode.
- Configure my remote development environment on a dedicated server, which usually does all heavy lifting.
- Deploy many other self-hosted services, such as SearX or Firefly III.
- Backup database:
cp -r ~/Cloud /media/<username>/<ID>/Cloud
- Backup zsh history:
cp ~/.zsh_history /media/<username>/<ID>/.zsh_history
- Check that KeePass database isn't corrupted.
- Upgrade packages:
sudo apt update && sudo apt upgrade -y
- Install required packages:
sudo apt install -y git keepassxc python3 python3-pip python3-virtualenv make
- Clone
CIDE
repo:mkdir -p ~/Projects && cd ~/Projects git clone https://github.com/0x29a/cide.git --recursive && cd cide
- Insert backup USB, open KeePassXC (
SSH
) and export ssh keys to the~/.ssh/
directory. - Create
.vars.private.yml
and put to it all necessary secrets from KeePassXC (CIDE private vars
):cp example.vars.private.yml .vars.private.yml
- [Optionally] Put zsh history in place:
cp /media/<username>/<ID>/.zsh_history playbooks/roles/zsh/files/.zsh_history.localhost
- Run installation:
make set_up_localhost
- Log in and log out to activate new default shell.
- Open Syncthing Web UI, remove default folder and configure all devices.
- [TO AUTOMATE] Add a new keyboard layout and set shortcut.
- [TO AUTOMATE] Install Tor Browser.
- [TO AUTOMATE] Reverse touchpad scroll.
- [TO AUTOMATE] Add custom certificates for Vault.
- [TO AUTOMATE] OBS collections and profiles import.
- Add the following to
/etc/hosts
:<ide_server_ip_address> cloud
- Create
.vars.private.yml
and put to it all necessary secrets:cp example.vars.private.yml .vars.private.yml
- [Optionally] Put zsh history in place:
cp /media/<username>/<ID>/.zsh_history playbooks/roles/zsh/files/.zsh_history.cloud
- Update Toggl transfer script timestamp in
roles/opencraft/files/.latest
. - Add an additional IP address:
sudo ip address add <SECONDARY_IP_ADDRESS>/32 dev <INTERFACE>
. - Run playbook to deploy user and SSH keys:
make bootstrap
- If user and SSH keys were deployed successfully, deploy everything else:
make deploy
- Change default SSH port for CIDE, add the following to
~/.ssh/config
:Host cloud HostName cloud Port 2123 ForwardAgent yes
- Open SSH tunnel, open
127.0.0.1:8137
and install these addons:bungcip.better-toml
ms-azuretools.vscode-docker
dbaeumer.vscode-eslint
eamodio.gitlens
ms-toolsai.jupyter
.ms-python.python
.vscode-icons-team.vscode-icons
.redhat.vscode-yaml
.esbenp.prettier-vscode
.ms-vscode.vscode-typescript-tslint-plugin
.sainnhe.gruvbox-material
.