My homelab and hosting stuff.
- Use tf to build temporary VPS hosts
This repository uses Terraform to manage Incus containers across different hosts.
- dev/: Development environment configuration targeting
incus-server. - prd/: Production environment configuration targeting
shell.grds.io. - grds.io/: Reusable Terraform modules.
- Incus installed and configured.
- Terraform installed.
- Remotes added to your local Incus config:
incus remote add incus-server <address> incus remote add shell.grds.io <address>
Navigate to the environment directory and initialize Terraform:
terraform init
terraform applyThis repository uses Ansible to manage system configuration and firewall rules.
- Encrypt Secrets: The
ansible/inventory/group_vars/prd/vault.ymlfile contains sensitive information like home IP addresses. It must be encrypted before commit:cd ansible ansible-vault encrypt inventory/group_vars/prd/vault.yml - Running Playbooks: To apply configurations:
ansible-playbook site.yml --ask-vault-pass
Dev machines are provisioned with Terraform and configured with Ansible. They feature a pre-configured development environment including Neovim (LazyVim), Docker, and common CLI tools.
Follow these steps to provision and configure a new development environment:
-
Add the Host to Terraform: Edit
terraform/dev-machines/dev_containers.ymland add a new entry undercontainers:containers: - name: my-new-dev-box image: images:ubuntu/24.04/cloud
-
Provision with Terraform: Apply the changes to create the Incus container:
cd terraform/dev-machines terraform applyNote: By default, this uses a pre-configured SSH key. To use a different one, run
terraform apply -var="ssh_public_key=$(cat ~/.ssh/id_rsa.pub)". -
Configure with Ansible: Run the specific dev playbook to install tools and sync your Neovim configuration. Ansible automatically discovers the new host via the Incus dynamic inventory.
cd ansible ansible-playbook dev.yml
- Neovim: A full LazyVim setup with:
- CodeCompanion: AI-powered coding assistant (configured for OpenRouter).
- Catppuccin Theme: High-quality color scheme.
- Core Tools:
ripgrep,fzf,fd,jq,unzip, etc.
- Language Support: Python (venv, uv) and Node.js (npm, pnpm) pre-installed.
- AI Tools: opencode pre-installed.
- System: Automatic package updates and a dedicated
gradiususer.