Skip to content

Personal homelab infrastructure as-code

License

Notifications You must be signed in to change notification settings

chezmoi-sh/atlas

Repository files navigation

chezmoi.sh · Atlas
Bernese Mountain Dog as logo

Atlas - My homelab infrastructure as-code


ℹ️ About

Welcome to the repository for my personal homelab infrastructure. This monorepo contains all the code and configurations for managing my homelab, including various services and tools. This repository will probably never be finished, as I'll always be adding new services or tools to my homelab, where I'd like to make improvements on them.

Warning

This repository is a work in progress and currently in a proof of concept phase to find the way I want to manage this homelab. It is not yet ready to be reused or forked.

🚀 Getting Started

Prerequisites

Installation

Note

This repository has been designed to be used inside a DevContainer, so any other way to interact with it will not be documented.

# Clone the repository
git clone https://github.com/chezmoi-sh/atlas.git

# Run the development environment
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . -- zsh

📁 Project Structure

├── .devcontainer                   # Development environment setup (DevContainer/Codespaces)
│   ├── devcontainer.json           # DevContainer configuration file
│   └── Dockerfile                  # Dockerfile on which the DevContainer is based
├── .github
│   └── assets                      # Repository assets (images, video, etc.) used in the documentation.
├── catalog
│   ├── crossplane                  # Crossplane composition definitions
│   └── flakes                      # OCI images used by the homelab and built using Nix
├── projects
│   ├── chezmoi.sh                  # Ressources that are not directly related to any other project
│   │   └── src
│   │       ├── infrastructure
│   │       │   └── live
│   │       │       └── production  # Infrastructure definitions based on Crossplane
│   │       └── kubevault           # Vault related resources and documentation
│   ├── hass                        # Home Assistant related resources and documentation
│   │   └── src
│   │       └── infrastructure
│   │           └── live
│   │               └── production  # Infrastructure definitions based on Crossplane
│   └── nex.rpi                     # Mission-critical applications for the homelab (NEXus · Raspberry PI)
│       └── src
│           ├── apps                # Kubernetes resources
│           ├── clusters
│           │   └── production      # Kubernetes cluster composition
│           └── infrastructure
│               └── live
│                   └── production  # Infrastructure definitions based on Crossplane
├── scripts
│   └── folderinfo                  # Perl script to generate a tree-like structure of directories
├── .envrc                          # Environment configuration file (using direnv)
├── .lefthook.yaml                  # Git hooks configuration file (using lefthook)
├── DISASTER_RECOVERY_PLAN.md       # Document describing the disaster recovery plan
└── flake.nix                       # Nix flake configuration file containing all required dependencies

🗺️ Roadmap

Note

I'm currently trying to find a way to manage my homelab infrastructure as code. This roadmap is a work in progress and will be updated as I find new ways to improve my homelab. All the history of my choices and changes will be documented in the CHANGELOG.

  • Try using docker-compose and scripts to manage all containers in the homelab (See CHANGELOG)

  • Try using Pulumi to manage the infrastructure (See CHANGELOG)

  • Try using Helm to manage the Kubernetes applications and Terraform to manage the infrastructure (See CHANGELOG)

  • Improve the dev experience by improving the DevContainer and Nix environment (making it less bloated / more efficient)

🛡️ License

This repository is licensed under the Apache-2.0.

Caution

This is a personal project intended for my own use. Feel free to explore and use the code, but please note that it comes with no warranties or guarantees. Use it at your own risk.