docs(projects): standarize homelab taxonomy and convert paths to
Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 6s
Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 6s
relative links - Update all Homelab documents and engineering journals with core tags (`architecture`, `security`, `operations`, `ADR`). - Replace machine-specific `file:///` URLS and absolute local paths with portable relative Markdown links and code backticks. - Align Homelab project landing page and documentation status with current infrastructure topology
This commit is contained in:
1 parent
c9a98f057d
commit
da0adfc7bf
59 files changed
+267
-144
No files matched your search
@@ -2,6 +2,9 @@
|
||||
type: project
|
||||
status: active
|
||||
tags:
|
||||
- architecture
|
||||
- operations
|
||||
- security
|
||||
- homelab
|
||||
- infrastructure
|
||||
---
|
||||
@@ -37,7 +40,7 @@ The homelab is organized into four decoupled architectural layers to isolate fai
|
||||
| :--- | :--- | :--- |
|
||||
| **Gitea Forge** | [homelab-core](https://gitea.roadtotech.me/kiskaadee/homelab-core) | Primary Git repository housing the NixOS appliance and Core services |
|
||||
| **Clone (SSH)** | `ssh://git@gitea.roadtotech.me:2223/kiskaadee/homelab-core.git` | Developer clone URL using SSH port 2223 |
|
||||
| **Workstation Path** | `/home/kiskaadee/Projects/active/homelab/Core` | Active local development checkout on laptop workstation |
|
||||
| **Workstation Path** | `~/Homelab/Core` | Active local development checkout on workstation (`~/Homelab/Core` and `~/Homelab/Sites`) |
|
||||
| **Production Target** | `server-remote:~/Core` | Production deployment checkout on the 24/7 server host |
|
||||
|
||||
---
|
||||
|
||||
@@ -3,10 +3,12 @@ type: plan
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- homelab
|
||||
- architecture
|
||||
- gitops
|
||||
- security
|
||||
- operations
|
||||
- ADR
|
||||
- homelab
|
||||
- gitops
|
||||
- roadmap
|
||||
---
|
||||
|
||||
@@ -77,7 +79,7 @@ The legacy documentation depicts a 2-tier system (`Control Plane -> Data Plane`)
|
||||
* **Resolution**:
|
||||
1. **Abolish `custom` commands completely**. Deployment actions must be a closed, hardcoded enum: `git_pull`, `compose_config`, `compose_pull`, `compose_up`, `healthcheck`.
|
||||
2. **Webhook Authentication**: Require Gitea HMAC-SHA256 signature verification (`X-Gitea-Signature`) using a secret token stored via SOPS.
|
||||
3. **Strict Target Containment**: Validate that target paths are strictly canonicalized under `/home/kiskaadee/Sites/<allowed-repo>` with no path traversal (`..`) permitted.
|
||||
3. **Strict Target Containment**: Validate that target paths are strictly canonicalized under `~/Sites/<allowed-repo>` with no path traversal (`..`) permitted.
|
||||
|
||||
#### B. Manifest Ownership & Schema Contract
|
||||
* **Problem**: `app.yaml` is parsed with a lightweight, forgiving manual parser. Certain fields like `auth: false` or `networks: [proxy-net]` appear declarative, yet actual enforcement lives inside Docker Compose labels.
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
---
|
||||
type: plan
|
||||
project: homelab
|
||||
status: completed
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- gitea
|
||||
- brain
|
||||
- sync
|
||||
- gitops
|
||||
- cicd
|
||||
- homelab
|
||||
status: completed
|
||||
---
|
||||
|
||||
# 🧠 Real-Time Brain Synchronization, CI/CD & Gitea Push Mirroring
|
||||
|
||||
@@ -3,6 +3,8 @@ type: plan
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- appctl
|
||||
- homelab
|
||||
- cutover
|
||||
@@ -45,7 +47,7 @@ flowchart TD
|
||||
## 📋 Step-by-Step Execution Plan
|
||||
|
||||
### Phase 1: Declarative Configuration & Domain Update
|
||||
Update NixOS declarations to define `roadtotech.me` globally and point the systemd service to `/home/kiskaadee/Core`:
|
||||
Update NixOS declarations to define `roadtotech.me` globally and point the systemd service to `~/Core`:
|
||||
|
||||
1. **Update NixOS Declarations**:
|
||||
- `~/Config/hosts/desktop/homeserver.nix`:
|
||||
|
||||
@@ -3,6 +3,8 @@ type: plan
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- homelab
|
||||
- server
|
||||
- ddns
|
||||
@@ -38,7 +40,7 @@ Migrate all homelab public endpoints, Authelia single sign-on (SSO), Traefik rev
|
||||
- Wildcard dynamic DNS configured for `*.roadtotech.me` and apex `roadtotech.me`.
|
||||
- [x] **Step 2: Declarative NixOS Configuration Updated**
|
||||
- `hosts/desktop/homeserver.nix`: Configured `DOMAIN = "roadtotech.me"`.
|
||||
- `hosts/desktop/traefik-deployments.nix`: Configured `DOMAIN_SUFFIX = "roadtotech.me"` and `DOCS_PROJECT_PATH = "/home/kiskaadee/Brain"`.
|
||||
- `hosts/desktop/traefik-deployments.nix`: Configured `DOMAIN_SUFFIX = "roadtotech.me"` and `DOCS_PROJECT_PATH = "~/Brain"`.
|
||||
- Secrets rendered to `/run/secrets/rendered/homeserver.env` and `/run/secrets/rendered/traefik-deployments.env`.
|
||||
- [x] **Step 3: Traefik & Wildcard SSL Validation**
|
||||
- Let's Encrypt DNS-01 wildcard challenge successfully issued certificate for `roadtotech.me` and `*.roadtotech.me`.
|
||||
|
||||
@@ -3,6 +3,8 @@ type: plan
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- homelab
|
||||
- appctl
|
||||
- git
|
||||
@@ -12,7 +14,7 @@ tags:
|
||||
# 🔄 appctl Git Synchronization & Full-Stack Lifecycle Strategy
|
||||
|
||||
## 🎯 Motivation & Rationale
|
||||
In a decentralized homelab architecture where [`~/Core`](file:///home/kiskaadee/Core) and every application stack in [`~/Sites`](file:///home/kiskaadee/Sites) are independent Git repositories:
|
||||
In a decentralized homelab architecture where `~/Core` and every application stack in `~/Sites` are independent Git repositories:
|
||||
1. **Prevent Configuration Drift**: Developers frequently push edits (compose labels, `app.yaml` metadata, Dockerfile changes) from laptops or secondary workstations. The production server needs instant visibility into repositories that are behind remote (`git pull` needed) or ahead of remote (`git push` pending).
|
||||
2. **Prevent Forgotten Uncommitted State**: Dirty working trees on production need to be surfaced prominently to avoid accidental overwrites or uncommitted production hotfixes.
|
||||
3. **Atomic Stack Updates (`appctl update`)**: Provide a single command that pulls Git repository changes, pulls new Docker container images, recreates the stack, and synchronizes the Homepage dashboard.
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
type: plan
|
||||
status: completed
|
||||
project: homelab
|
||||
tags: [homelab, nixos, appliance, migration]
|
||||
tags:
|
||||
- architecture
|
||||
- operations
|
||||
- homelab
|
||||
- nixos
|
||||
- appliance
|
||||
- migration
|
||||
---
|
||||
|
||||
# Implementation Plan: Turn `homelab-core` into a Declarative NixOS Appliance
|
||||
@@ -79,7 +85,7 @@ flowchart TD
|
||||
```
|
||||
|
||||
### Phase 1: Repository Scaffolding in `homelab-core`
|
||||
1. Create a dedicated branch in `/home/kiskaadee/Projects/active/homelab/homelab-core`:
|
||||
1. Create a dedicated branch in `~/Projects/active/homelab/homelab-core`:
|
||||
`feat/nixos-appliance`
|
||||
2. Create directory `nixos/` with subdirectories `nixos/modules/` and `nixos/scripts/`.
|
||||
3. Create `.sops.yaml` in `homelab-core` containing the server's age key (`*server`) and user's key (`*kiskaadee`).
|
||||
@@ -173,18 +179,18 @@ Document this exact runbook in `homelab-core/docs/disaster-recovery.md`:
|
||||
nixos-generate-config --root /mnt
|
||||
|
||||
# 4. Clone homelab-core into target root:
|
||||
git clone https://github.com/kiskaadee/homelab-core.git /mnt/home/kiskaadee/Core
|
||||
git clone https://github.com/kiskaadee/homelab-core.git /mnt~/Core
|
||||
# (or via local USB backup / Gitea)
|
||||
|
||||
# 5. Copy the generated hardware-configuration.nix into the repo:
|
||||
cp /mnt/etc/nixos/hardware-configuration.nix /mnt/home/kiskaadee/Core/nixos/hardware-configuration.nix
|
||||
cp /mnt/etc/nixos/hardware-configuration.nix /mnt~/Core/nixos/hardware-configuration.nix
|
||||
|
||||
# 6. Restore the server age secret key (from offline password manager/backup):
|
||||
mkdir -p /mnt/var/lib/sops-nix
|
||||
# Place key at /mnt/var/lib/sops-nix/key.txt or /mnt/etc/ssh/ssh_host_ed25519_key
|
||||
|
||||
# 7. Install system directly from homelab-core:
|
||||
nixos-install --flake /mnt/home/kiskaadee/Core#server
|
||||
nixos-install --flake /mnt~/Core#server
|
||||
|
||||
# 8. Reboot: The entire homelab, Traefik, Docker services, and GitOps wake up automatically!
|
||||
reboot
|
||||
|
||||
@@ -3,6 +3,8 @@ type: plan
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- architecture
|
||||
- operations
|
||||
- homelab
|
||||
- nixos
|
||||
- migration
|
||||
|
||||
@@ -3,6 +3,8 @@ type: plan
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- architecture
|
||||
- operations
|
||||
- homelab
|
||||
- appctl
|
||||
- metadata
|
||||
|
||||
@@ -3,6 +3,9 @@ type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-14
|
||||
tags:
|
||||
- architecture
|
||||
- security
|
||||
- ADR
|
||||
- homelab
|
||||
- authelia
|
||||
- lldap
|
||||
|
||||
@@ -3,9 +3,11 @@ type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-14
|
||||
tags:
|
||||
- architecture
|
||||
- security
|
||||
- ADR
|
||||
- homelab
|
||||
- authelia
|
||||
- security
|
||||
- auth
|
||||
---
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-08
|
||||
tags:
|
||||
- architecture
|
||||
- operations
|
||||
- homelab
|
||||
- ai
|
||||
- chatbot
|
||||
@@ -83,6 +85,6 @@ Create a lightweight, self-hosted chatbot backend running on the `roadtotech.me`
|
||||
- **09:00 PM**: Evening reflection reminder.
|
||||
|
||||
### Phase 3: Brain Vault Tools & RAG
|
||||
* Connect the assistant with read/write access to `/home/kiskaadee/Brain`:
|
||||
* Connect the assistant with read/write access to `~/Brain`:
|
||||
- `/note <text>`: Appends entry to `~/Brain/journal/daily/YYYY-MM-DD.md`.
|
||||
- `/ask <question>`: RAG search across `~/Brain/knowledge` to answer questions about past study notes.
|
||||
@@ -3,6 +3,9 @@ type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-15
|
||||
tags:
|
||||
- architecture
|
||||
- security
|
||||
- ADR
|
||||
- homelab
|
||||
- email
|
||||
- lldap
|
||||
|
||||
@@ -3,12 +3,14 @@ type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-11
|
||||
tags:
|
||||
- architecture
|
||||
- operations
|
||||
- ADR
|
||||
- homelab
|
||||
- dynu
|
||||
- ddns
|
||||
- python
|
||||
- rust
|
||||
- architecture
|
||||
---
|
||||
|
||||
# 🔄 Discussion: Dynu DDNS Polling Frequency, Resolver Rotation, and Rust Migration
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
---
|
||||
type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-10
|
||||
tags:
|
||||
- architecture
|
||||
- operations
|
||||
- security
|
||||
- ADR
|
||||
- homelab
|
||||
- gitea
|
||||
- git
|
||||
- backup
|
||||
- homelab
|
||||
date: 2026-09-10
|
||||
---
|
||||
|
||||
# Discussion: Gitea Git Credential Helper, Protocol Trade-Offs, and Hybrid Backup Architecture
|
||||
|
||||
@@ -3,13 +3,16 @@ type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-08
|
||||
tags:
|
||||
- architecture
|
||||
- security
|
||||
- operations
|
||||
- ADR
|
||||
- homelab
|
||||
- gitops
|
||||
- webhook
|
||||
- gitea
|
||||
- appctl
|
||||
- automation
|
||||
- architecture
|
||||
---
|
||||
|
||||
# 🚀 Dynamic Decentralized GitOps Dispatcher Architecture
|
||||
@@ -79,12 +82,12 @@ flowchart TD
|
||||
## 🧩 Key System Components
|
||||
|
||||
### 1. The Declarative Webhook Daemon (`pkgs.webhook`)
|
||||
The webhook listener is declared immutably via NixOS in [`Config/hosts/server/homeserver.nix`](file:///home/kiskaadee/Config/hosts/server/homeserver.nix):
|
||||
The webhook listener is declared immutably via NixOS in `Config/hosts/server/homeserver.nix`:
|
||||
- **Port**: `9000` (Internal LAN / Tailscale only).
|
||||
- **Service Name**: `homelab-gitops.service`.
|
||||
- **Payload Handling**: Configured with `pass-arguments-to-command = [ { source = "entire-payload"; } ]`, passing the complete Gitea JSON event payload directly into the Python dispatcher arguments.
|
||||
|
||||
### 2. The Dynamic Dispatcher Engine ([`gitops_dispatcher.py`](file:///home/kiskaadee/Projects/active/homelab/homelab-core/scripts/gitops_dispatcher.py))
|
||||
### 2. The Dynamic Dispatcher Engine (`gitops_dispatcher.py`)
|
||||
A zero-dependency Python 3 engine executing on the server host:
|
||||
- Parses the repository name and ref (`branch`) from standard input.
|
||||
- Dynamically locates the target directory in `~/Sites` (matching `<repo>`, `homelab-<repo>`, or data vaults).
|
||||
|
||||
@@ -3,8 +3,10 @@ type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-14
|
||||
tags:
|
||||
- homelab
|
||||
- architecture
|
||||
- operations
|
||||
- ADR
|
||||
- homelab
|
||||
- gitops
|
||||
- workspace
|
||||
---
|
||||
@@ -147,10 +149,10 @@ If you decide to move to the dedicated `~/Homelab` structure:
|
||||
mv ~/Projects/homelab ~/Homelab
|
||||
ln -s ~/Homelab ~/Projects/homelab
|
||||
```
|
||||
2. **Add Jumper Alias to [`home/shell/jump.sh`](file:///home/kiskaadee/Config/home/shell/jump.sh)**:
|
||||
2. **Add Jumper Alias to `home/shell/jump.sh`**:
|
||||
```bash
|
||||
hl() { jump "$HOME/Homelab" "$1" 2; }
|
||||
homelab() { hl "$@"; }
|
||||
```
|
||||
3. **Update DankSearch Indexing in [`home/desktop.nix`](file:///home/kiskaadee/Config/home/desktop.nix)**:
|
||||
3. **Update DankSearch Indexing in `home/desktop.nix`**:
|
||||
Add `~/Homelab` as an explicit indexed search root so full-text search covers server configs cleanly without traversing symlink loops.
|
||||
@@ -3,6 +3,9 @@ type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-15
|
||||
tags:
|
||||
- architecture
|
||||
- security
|
||||
- ADR
|
||||
- homelab
|
||||
- email
|
||||
- hostinger
|
||||
|
||||
@@ -3,10 +3,12 @@ type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-15
|
||||
tags:
|
||||
- architecture
|
||||
- security
|
||||
- ADR
|
||||
- homelab
|
||||
- email
|
||||
- stalwart
|
||||
- architecture
|
||||
---
|
||||
|
||||
# Mail Server Evaluation for Homelab Core: Why Stalwart is the Modern Standard
|
||||
|
||||
@@ -3,6 +3,9 @@ type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-14
|
||||
tags:
|
||||
- architecture
|
||||
- operations
|
||||
- ADR
|
||||
- homelab
|
||||
- homepage
|
||||
- courses
|
||||
@@ -16,8 +19,8 @@ This document analyzes and outlines the execution plan for disentangling **Homep
|
||||
|
||||
### Verdict: Is this the right direction?
|
||||
**Yes, strongly affirmative.**
|
||||
- **Homepage** is an administrative and operational dashboard coupled to Core infrastructure (`socket-proxy`, `socket-net`, `traefik`, host system resource widgets). It belongs in `/home/kiskaadee/Homelab/Core`.
|
||||
- **Courses** (the learning API & Kanban) is a discrete user-domain application with its own database (Turso/LibSQL), domain logic, and frontend requirements. It belongs in `/home/kiskaadee/Homelab/Sites/courses`.
|
||||
- **Homepage** is an administrative and operational dashboard coupled to Core infrastructure (`socket-proxy`, `socket-net`, `traefik`, host system resource widgets). It belongs in `~/Homelab/Core`.
|
||||
- **Courses** (the learning API & Kanban) is a discrete user-domain application with its own database (Turso/LibSQL), domain logic, and frontend requirements. It belongs in `~/Homelab/Sites/courses`.
|
||||
- **Decoupling eliminates technical debt**: Injecting the learning Kanban into Homepage via `custom.js` and `custom.css` with DOM mutations (`MutationObserver`) was an architectural anti-pattern. Decoupling allows Homepage to remain fast and standard, while providing Courses with a dedicated standalone web UI.
|
||||
|
||||
---
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-11
|
||||
tags: [nixos, homelab, architecture, inventory]
|
||||
tags:
|
||||
- architecture
|
||||
- operations
|
||||
- ADR
|
||||
- nixos
|
||||
- homelab
|
||||
- inventory
|
||||
---
|
||||
|
||||
# Migration Blueprint: Splitting `nixos-config` and `homelab-core`
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
---
|
||||
type: discussion
|
||||
project: homelab
|
||||
date: 2026-09-11
|
||||
tags:
|
||||
- nixos
|
||||
- architecture
|
||||
- operations
|
||||
- ADR
|
||||
- nixos
|
||||
- homelab
|
||||
- monorepo
|
||||
date: 2026-09-11
|
||||
---
|
||||
|
||||
# Architectural Analysis: NixOS Monorepo vs. Multi-Repo for Homelab & Workstations
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
type: guide
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- homelab
|
||||
- appctl
|
||||
- architecture
|
||||
- devops
|
||||
- git
|
||||
---
|
||||
@@ -29,7 +30,7 @@ This guide covers everyday operations for managing containerized applications in
|
||||
## 🏛️ Directory Layout
|
||||
|
||||
```text
|
||||
/home/kiskaadee/
|
||||
~/
|
||||
├── Core/ # Control Plane (Traefik, Authelia, Socket-Proxy, Portainer, Dozzle)
|
||||
│ ├── docker-compose.yml
|
||||
│ ├── config/
|
||||
@@ -69,7 +70,7 @@ networks:
|
||||
|
||||
# Stack-specific default environment variables
|
||||
env:
|
||||
PROJECT_PATH: "/home/kiskaadee/Brain"
|
||||
PROJECT_PATH: "~/Brain"
|
||||
|
||||
# Optional dynamic GitOps deployment configuration
|
||||
deployment:
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
type: guide
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- homelab
|
||||
- brain
|
||||
- gitops
|
||||
@@ -21,7 +23,7 @@ Any change committed locally flows through a multi-stage pipeline:
|
||||
2. **Local Post-commit Trigger**: Automatic push over custom SSH port `2223`.
|
||||
3. **Gitea CI & Hot Mirroring**: Server-side Actions validation (`act_runner`) and GitHub backup sync.
|
||||
4. **Webhook Event Dispatch**: Internal HTTP POST to `homelab-gitops` on port `9000`.
|
||||
5. **Host-Level GitOps Dispatcher**: Zero-delay fast-forward Git pull into the server's `/home/kiskaadee/Brain` instance.
|
||||
5. **Host-Level GitOps Dispatcher**: Zero-delay fast-forward Git pull into the server's `~/Brain` instance.
|
||||
6. **Live Consumer API & Presentation**: Instantaneous rendering via `homelab-doc2site` at `https://docs.roadtotech.me`.
|
||||
|
||||
---
|
||||
@@ -53,7 +55,7 @@ flowchart TD
|
||||
subgraph ServerHost["3. Homeserver Host (192.168.1.36)"]
|
||||
WebhookDaemon["systemd: homelab-gitops\n(webhook daemon :9000)"]
|
||||
Dispatcher["gitops_dispatcher.py\n(payload resolver)"]
|
||||
BrainVault["/home/kiskaadee/Brain\n(git pull --ff-only)"]
|
||||
BrainVault["~/Brain\n(git pull --ff-only)"]
|
||||
|
||||
WebhookTrigger --> WebhookDaemon --> Dispatcher --> BrainVault
|
||||
end
|
||||
@@ -76,7 +78,7 @@ flowchart TD
|
||||
|
||||
The repository uses native Git hooks located in `.githooks/` (configured via `git config core.hooksPath .githooks`):
|
||||
|
||||
- **`pre-commit`**: Executes [`scripts/validate-brain.py`](file:///home/kiskaadee/Brain/scripts/validate-brain.py) before finalizing any commit. It enforces:
|
||||
- **`pre-commit`**: Executes [`scripts/validate-brain.py`](../../../scripts/validate-brain.py) before finalizing any commit. It enforces:
|
||||
1. *No deprecated directories* (`notes/`, `scratch/`, etc.).
|
||||
2. *Required root files* (`README.md`, `AGENTS.md`, `flake.nix`, etc.).
|
||||
3. *Frontmatter schema* (`type`, `status`, `topics`, `tags`, `project`).
|
||||
@@ -136,10 +138,10 @@ Upon push completion, Gitea delivers an HTTP POST event to the server's internal
|
||||
- **Endpoint**: `http://192.168.1.36:9000/hooks/deploy`
|
||||
- **Payload**: Gitea JSON push payload detailing repository name (`second-brain`), branch (`refs/heads/main`), and commit SHAs.
|
||||
|
||||
The server's systemd unit (`homelab-gitops`) pipes this payload directly into [`homelab-core/scripts/gitops_dispatcher.py`](file:///home/kiskaadee/Projects/active/homelab/homelab-core/scripts/gitops_dispatcher.py):
|
||||
The server's systemd unit (`homelab-gitops`) pipes this payload directly into `homelab-core/scripts/gitops_dispatcher.py`:
|
||||
|
||||
1. `gitops_dispatcher.py` identifies `second-brain` as a core data vault.
|
||||
2. It resolves the vault target directory to `/home/kiskaadee/Brain`.
|
||||
2. It resolves the vault target directory to `~/Brain`.
|
||||
3. It runs `git pull --ff-only origin main` in the background.
|
||||
4. Total execution time from local `git commit` to server synchronization is typically **under 1.5 seconds**.
|
||||
|
||||
@@ -147,7 +149,7 @@ The server's systemd unit (`homelab-gitops`) pipes this payload directly into [`
|
||||
|
||||
### 4. Consumer API & Live Presentation (`doc2site`)
|
||||
|
||||
- The documentation rendering service (`homelab-doc2site`) runs in Docker and mounts `/home/kiskaadee/Brain` directly into its container filesystem.
|
||||
- The documentation rendering service (`homelab-doc2site`) runs in Docker and mounts `~/Brain` directly into its container filesystem.
|
||||
- Because `git pull` directly updates the underlying markdown files on the server host, `doc2site` serves the updated knowledge graph immediately upon HTTP request without needing a container rebuild, restart, or cache purge.
|
||||
- The web portal is accessible at `https://docs.roadtotech.me`.
|
||||
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
type: guide
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- homelab
|
||||
- dynu
|
||||
- ddns
|
||||
- wan
|
||||
- troubleshooting
|
||||
- homelab
|
||||
---
|
||||
# Dynu DDNS Domain Configuration Troubleshooting
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
type: guide
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- homelab
|
||||
- homepage
|
||||
- core
|
||||
@@ -11,14 +13,14 @@ tags:
|
||||
# Walkthrough: Homepage Reintegration into Homelab Core
|
||||
|
||||
## Overview
|
||||
We have extracted **Homepage** (`gethomepage`) from the temporary hybrid `Sites/dashboard` repository and reintegrated it as a first-class service in [Homelab/Core](/home/kiskaadee/Homelab/Core).
|
||||
We have extracted **Homepage** (`gethomepage`) from the temporary hybrid `Sites/dashboard` repository and reintegrated it as a first-class service in `Homelab/Core` (`~/Core`).
|
||||
|
||||
---
|
||||
|
||||
## Changes Implemented
|
||||
|
||||
### 1. Reintegrated Clean Configuration
|
||||
- **Location**: `/home/kiskaadee/Homelab/Core/config/homepage/`
|
||||
- **Location**: `~/Homelab/Core/config/homepage/`
|
||||
- **Assets Migrated**:
|
||||
- `bookmarks.yaml`: Personal project and social quicklinks
|
||||
- `docker.yaml`: Direct connection to `socket-proxy:2375`
|
||||
@@ -57,7 +59,7 @@ We have extracted **Homepage** (`gethomepage`) from the temporary hybrid `Sites/
|
||||
```bash
|
||||
appctl sync
|
||||
# ✨ Homepage synchronized successfully (4 visible apps in 4 groups)
|
||||
# 📄 Generated /home/kiskaadee/Homelab/Core/config/homepage/services.yaml
|
||||
# 📄 Generated ~/Homelab/Core/config/homepage/services.yaml
|
||||
```
|
||||
3. **Core Service Listing**:
|
||||
```bash
|
||||
@@ -66,6 +68,6 @@ We have extracted **Homepage** (`gethomepage`) from the temporary hybrid `Sites/
|
||||
```
|
||||
4. **Compose Syntax Validation**:
|
||||
```bash
|
||||
docker compose -f /home/kiskaadee/Homelab/Core/docker-compose.yml config
|
||||
docker compose -f ~/Homelab/Core/docker-compose.yml config
|
||||
# Configuration verified valid
|
||||
```
|
||||
@@ -2,6 +2,9 @@
|
||||
type: guide
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- security
|
||||
- architecture
|
||||
- homelab
|
||||
- lldap
|
||||
- authelia
|
||||
@@ -14,36 +17,36 @@ tags:
|
||||
## Summary of Completed Implementations
|
||||
|
||||
### 1. Repository Tests in Pre-Commit Hook
|
||||
- **Hook Location**: [`.githooks/pre-commit`](file:///home/kiskaadee/Homelab/Core/.githooks/pre-commit) (executable, tracked in git).
|
||||
- **Hook Location**: `.githooks/pre-commit` (executable, tracked in git).
|
||||
- **Git Hooks Path**: Configured via `git config core.hooksPath .githooks` on both local dev and production server environments.
|
||||
- **Flake Integration**: [`flake.nix`](file:///home/kiskaadee/Homelab/Core/flake.nix#L35-L37) now includes a `shellHook` that automatically ensures `core.hooksPath` is registered whenever entering the Nix development shell.
|
||||
- **Structural Invariant Test**: Added `.githooks/pre-commit` presence and executable bit verification in [`tests/structural/test_repository_structure.py`](file:///home/kiskaadee/Homelab/Core/tests/structural/test_repository_structure.py#L29-L39).
|
||||
- **Flake Integration**: `flake.nix` now includes a `shellHook` that automatically ensures `core.hooksPath` is registered whenever entering the Nix development shell.
|
||||
- **Structural Invariant Test**: Added `.githooks/pre-commit` presence and executable bit verification in `tests/structural/test_repository_structure.py`.
|
||||
- **Verification**: Verified automatically on `git commit` — executes Ruff linter and the full 35 Pytest invariant tests in ~0.12s before allowing commits.
|
||||
|
||||
---
|
||||
|
||||
### 2. LLDAP Service & Dynamic User Backend
|
||||
- **Service Container**: `nitnelave/lldap:stable` deployed in [`docker-compose.yml`](file:///home/kiskaadee/Homelab/Core/docker-compose.yml#L102-L133) on `proxy-net`.
|
||||
- **Service Container**: `nitnelave/lldap:stable` deployed in `docker-compose.yml` on `proxy-net`.
|
||||
- **Public Admin & Self-Service UI**: [https://users.roadtotech.me](https://users.roadtotech.me) (secured with Traefik TLS ACME certificate).
|
||||
- **Internal LDAP Endpoint**: `ldap://lldap:3890` with Base DN `dc=roadtotech,dc=me`.
|
||||
- **Decoupled SOPS Secrets**:
|
||||
- `LLDAP_JWT_SECRET`
|
||||
- `LLDAP_KEY_SEED`
|
||||
- `LLDAP_LDAP_USER_PASS` / `AUTHELIA_LDAP_PASSWORD`
|
||||
- Added to encrypted [`nixos/secrets.yaml`](file:///home/kiskaadee/Homelab/Core/nixos/secrets.yaml) and exposed via [`nixos/modules/homeserver.nix`](file:///home/kiskaadee/Homelab/Core/nixos/modules/homeserver.nix).
|
||||
- Added to encrypted `nixos/secrets.yaml` and exposed via `nixos/modules/homeserver.nix`.
|
||||
|
||||
---
|
||||
|
||||
### 3. Authelia LDAP Reconfiguration
|
||||
- **Backend Switched**: [`config/authelia/configuration.yml`](file:///home/kiskaadee/Homelab/Core/config/authelia/configuration.yml#L10-L28) replaced the static `file` backend with `ldap` pointing to `ldap://lldap:3890`.
|
||||
- **Backend Switched**: `config/authelia/configuration.yml` replaced the static `file` backend with `ldap` pointing to `ldap://lldap:3890`.
|
||||
- **Users File Removed**: Removed `/run/secrets/rendered/users.yml:/config/users.yml:ro` mount from Authelia.
|
||||
- **Bypass Rule**: Added `users.{{ env "DOMAIN" }}` to Authelia's bypass list so users can access LLDAP's login and self-service portal directly.
|
||||
- **Appctl Integration**: Registered `lldap` under **Core Infrastructure** in [`scripts/appctl_engine.py`](file:///home/kiskaadee/Homelab/Core/scripts/appctl_engine.py#L328) and Homepage dashboard card (`lldap.png` icon).
|
||||
- **Appctl Integration**: Registered `lldap` under **Core Infrastructure** in `scripts/appctl_engine.py` and Homepage dashboard card (`lldap.png` icon).
|
||||
|
||||
---
|
||||
|
||||
### 4. Directory Seeding & Verification
|
||||
- Created [`scripts/bootstrap_lldap_users.py`](file:///home/kiskaadee/Homelab/Core/scripts/bootstrap_lldap_users.py).
|
||||
- Created `scripts/bootstrap_lldap_users.py`.
|
||||
- Groups created in LLDAP: `admins`, `dev`, `users`.
|
||||
- Users migrated:
|
||||
- `kiskaadee` (`fcortesbio@gmail.com`) -> Groups: `admins`, `dev`
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
type: guide
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- homelab
|
||||
- email
|
||||
- deliverability
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
type: guide
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- security
|
||||
- homelab
|
||||
- sops
|
||||
- secrets
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
type: guide
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- homelab
|
||||
- appctl
|
||||
- traefik
|
||||
@@ -27,7 +29,7 @@ Deploying a new application consists of 4 steps:
|
||||
|
||||
## Step 1: Create the Project Repository
|
||||
|
||||
All user applications reside in independent repositories under `/home/kiskaadee/Sites/`:
|
||||
All user applications reside in independent repositories under `~/Sites/`:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/Sites/homelab-myapp
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
type: guide
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- homelab
|
||||
- nixos
|
||||
- maintenance
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
type: guide
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- homelab
|
||||
- troubleshooting
|
||||
- hardware
|
||||
|
||||
@@ -3,8 +3,9 @@ type: plan
|
||||
status: active
|
||||
project: homelab
|
||||
tags:
|
||||
- homelab
|
||||
- security
|
||||
- architecture
|
||||
- homelab
|
||||
- hardening
|
||||
- api
|
||||
---
|
||||
|
||||
@@ -3,6 +3,8 @@ type: plan
|
||||
status: active
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- homelab
|
||||
- cicd
|
||||
- gitops
|
||||
|
||||
@@ -3,10 +3,11 @@ type: plan
|
||||
status: active
|
||||
project: homelab
|
||||
tags:
|
||||
- homelab
|
||||
- architecture
|
||||
- gitops
|
||||
- security
|
||||
- operations
|
||||
- homelab
|
||||
- gitops
|
||||
- implementation
|
||||
---
|
||||
|
||||
@@ -22,14 +23,14 @@ The objective is not to introduce new infrastructure. It is to make the existing
|
||||
|
||||
| Phase / Milestone | Status | Deliverables Completed / Commits | Immediate Next Action |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **P0: GitOps Trust Boundary** | **🔒 100% SEALED & FROZEN** | Deliverables 1.1–1.5 ([`29dd186`](file:///home/kiskaadee/Projects/homelab/Core), [`01acdb4`](file:///home/kiskaadee/Projects/homelab/Core), [`fa8054a`](file:///home/kiskaadee/Projects/homelab/Core), [`c265c3e`](file:///home/kiskaadee/Projects/homelab/Core), [`5aae4ef`](file:///home/kiskaadee/Projects/homelab/Core), [`f8cbe08`](file:///home/kiskaadee/Projects/homelab/Core), [`4c9e7a4`](file:///home/kiskaadee/Projects/homelab/Core)) | Full admission pipeline, revision-consistent manifest validation, status tracking, and superseding async execution locked in. |
|
||||
| **Architecture Invariants & CI** | **✅ ESTABLISHED** | Deliverables 3.1, 3.2, 3.6 ([`142697a`](file:///home/kiskaadee/Projects/homelab/Core), [`f4b676b`](file:///home/kiskaadee/Projects/homelab/Core), [`3351466`](file:///home/kiskaadee/Projects/homelab/Core)) | 35 automated tests passing, `./scripts/test`, pure Nix `flake check`, Gitea Actions CI. |
|
||||
| **P0: GitOps Trust Boundary** | **🔒 100% SEALED & FROZEN** | Deliverables 1.1–1.5 (`29dd186`, `01acdb4`, `fa8054a`, `c265c3e`, `5aae4ef`, `f8cbe08`, `4c9e7a4`) | Full admission pipeline, revision-consistent manifest validation, status tracking, and superseding async execution locked in. |
|
||||
| **Architecture Invariants & CI** | **✅ ESTABLISHED** | Deliverables 3.1, 3.2, 3.6 (`142697a`, `f4b676b`, `3351466`) | 35 automated tests passing, `./scripts/test`, pure Nix `flake check`, Gitea Actions CI. |
|
||||
| **P1: Manifest Contract v1** | **🎯 UP NEXT** | Pending Deliverables 2.1–2.5 | Author `docs/architecture/manifest-specification.md` and JSON schema. Address repository identity authority & alias collision rejection. |
|
||||
| **P1: Privilege Boundary** | **⏳ PENDING** | Deliverables 4.1–4.4 | Dedicated `gitops` user & systemd confinement. |
|
||||
| **P2: Architecture Docs** | **⏳ PENDING** | Deliverables 5.1–5.9 | Architecture topologies, ownership matrix, and historical archive. |
|
||||
| **P3/P4: Reliability & Lifecycle** | **⏳ PENDING** | Deliverables 6.1–7.4 | Preflight checks, container health verification, deployment history, and systemd-supervised durable worker lifecycle. |
|
||||
|
||||
> **Current Repository State**: `main` branch at commit [`4c9e7a4`](file:///home/kiskaadee/Projects/homelab/Core). All 35 automated tests pass via `./scripts/test` and `nix flake check`. Gitea Actions CI enforces zero architectural regressions. P0 is functionally closed and frozen.
|
||||
> **Current Repository State**: `main` branch at commit `4c9e7a4`. All 35 automated tests pass via `./scripts/test` and `nix flake check`. Gitea Actions CI enforces zero architectural regressions. P0 is functionally closed and frozen.
|
||||
|
||||
---
|
||||
|
||||
@@ -263,7 +264,7 @@ homelab-magnetflix
|
||||
Map those identities to known directories under:
|
||||
|
||||
```text
|
||||
/home/kiskaadee/Sites/
|
||||
~/Sites/
|
||||
```
|
||||
|
||||
The important property is:
|
||||
|
||||
@@ -3,10 +3,11 @@ type: plan
|
||||
status: active
|
||||
project: homelab
|
||||
tags:
|
||||
- homelab
|
||||
- architecture
|
||||
- gitops
|
||||
- security
|
||||
- operations
|
||||
- homelab
|
||||
- gitops
|
||||
- roadmap
|
||||
- consolidation
|
||||
---
|
||||
@@ -58,7 +59,7 @@ architectural contracts.
|
||||
|
||||
### The Three-Layer Architecture with Orchestration Control Plane
|
||||
|
||||
The legacy docs in [`docs/legacy/architecture.html`](file:///home/kiskaadee/Projects/active/homelab/Core/docs/legacy/architecture.html) depict a two-tier "Control
|
||||
The legacy docs in `docs/legacy/architecture.html` depict a two-tier "Control
|
||||
Plane → Data Plane" model. In practice, the system operates across three
|
||||
execution layers, with orchestration acting as a **cross-cutting control
|
||||
mechanism** — not a fourth layer.
|
||||
@@ -141,10 +142,10 @@ into a proper **deployment admission pipeline**.
|
||||
|
||||
#### Threat Model
|
||||
|
||||
The current [`gitops_dispatcher.py`](file:///home/kiskaadee/Projects/active/homelab/Core/scripts/gitops_dispatcher.py) makes `app.yaml` effectively executable configuration via
|
||||
The current `gitops_dispatcher.py` makes `app.yaml` effectively executable configuration via
|
||||
the `custom` action path. The implementation feeds the configured command to
|
||||
`subprocess.run(cmd, shell=True, cwd=str(target_dir), check=True)` (line ~170).
|
||||
The GitOps service runs as `kiskaadee` (configured in [`homeserver.nix`](file:///home/kiskaadee/Projects/active/homelab/Core/nixos/modules/homeserver.nix)),
|
||||
The GitOps service runs as `kiskaadee` (configured in `homeserver.nix`),
|
||||
which belongs to `docker` and `wheel`. The full threat chain:
|
||||
|
||||
```
|
||||
@@ -213,7 +214,7 @@ admission pipeline that validates before acting:
|
||||
> ↓
|
||||
> Core: trusted mapping
|
||||
> ↓
|
||||
> /home/kiskaadee/Sites/homelab-docs
|
||||
> ~/Sites/homelab-docs
|
||||
> ```
|
||||
>
|
||||
> Canonical path validation (`realpath` under `~/Sites/<allowed-repo>`) remains
|
||||
@@ -267,7 +268,7 @@ contract.
|
||||
|
||||
#### Current State
|
||||
|
||||
The current [`appctl_engine.py`](file:///home/kiskaadee/Projects/active/homelab/Core/scripts/appctl_engine.py) uses a zero-dependency custom YAML parser
|
||||
The current `appctl_engine.py` uses a zero-dependency custom YAML parser
|
||||
(`parse_yaml_simple`) that is intentionally permissive. Fields like `auth`,
|
||||
`networks`, `env`, and `deployment` are consumed via `.get()` with defaults.
|
||||
There is no schema validation — any key is silently accepted, any missing key
|
||||
@@ -389,12 +390,12 @@ breaking existing repositories.
|
||||
**Priority:** Continuous Verification — parallel with Manifest Contract and
|
||||
Privilege Boundary.
|
||||
|
||||
**Goal:** Convert written architectural invariants from [`AGENTS.md`](file:///home/kiskaadee/Projects/active/homelab/Core/AGENTS.md) into
|
||||
**Goal:** Convert written architectural invariants from `AGENTS.md` into
|
||||
executable tests.
|
||||
|
||||
The current `AGENTS.md` already contains invariants (decentralized manifests,
|
||||
read-only socket-proxy, no committed secrets, Unlicense preservation). The
|
||||
[`docker-compose.yml`](file:///home/kiskaadee/Projects/active/homelab/Core/docker-compose.yml) correctly implements the socket-proxy policy
|
||||
`docker-compose.yml` correctly implements the socket-proxy policy
|
||||
(`POST=0`, `DELETE=0`). But these are convention-dependent — nothing prevents
|
||||
regression.
|
||||
|
||||
@@ -448,7 +449,7 @@ no references to deprecated paths (infra/core/, ./up.sh, ./down.sh)
|
||||
> [!TIP]
|
||||
> That last category is particularly valuable because the current repository
|
||||
> demonstrates exactly why documentation drift happens — the legacy
|
||||
> [`setup_guide.md`](file:///home/kiskaadee/Projects/active/homelab/Core/docs/setup_guide.md) and HTML docs reference patterns that no longer exist.
|
||||
> `setup_guide.md` and HTML docs reference patterns that no longer exist.
|
||||
|
||||
#### Deliverables
|
||||
|
||||
@@ -471,7 +472,7 @@ privileges.
|
||||
#### Current Problem
|
||||
|
||||
Even after removing `custom` execution, the GitOps service runs as `kiskaadee`
|
||||
(configured in [`homeserver.nix`](file:///home/kiskaadee/Projects/active/homelab/Core/nixos/modules/homeserver.nix)) with `wheel` and `docker` group membership. A remotely
|
||||
(configured in `homeserver.nix`) with `wheel` and `docker` group membership. A remotely
|
||||
triggered service should not possess that level of authority.
|
||||
|
||||
The current systemd service has no hardening directives — no `ProtectSystem`, no
|
||||
@@ -700,11 +701,11 @@ of shell scripts.
|
||||
|
||||
> **Secrets belong to the subsystem that semantically owns them.**
|
||||
|
||||
The current [`traefik-deployments.nix`](file:///home/kiskaadee/Projects/active/homelab/Core/nixos/modules/traefik-deployments.nix) acts as the Host Secret Projection Layer,
|
||||
The current `traefik-deployments.nix` acts as the Host Secret Projection Layer,
|
||||
injecting credentials into `/run/secrets/rendered/traefik-deployments.env`. This
|
||||
role should be formally documented.
|
||||
|
||||
The `system.pdf_decrypt_password` key currently lives in [`secrets.yaml`](file:///home/kiskaadee/Projects/active/homelab/Core/nixos/secrets.yaml) but is
|
||||
The `system.pdf_decrypt_password` key currently lives in `secrets.yaml` but is
|
||||
consumed via `dynu.nix` or `shell.nix`. Secrets should not live in modules based
|
||||
on which utility happens to consume them. The correct ownership model:
|
||||
|
||||
@@ -790,7 +791,7 @@ The refactoring makes that complexity legible — it does not add more.
|
||||
|
||||
### P0 — GitOps Trust Boundary
|
||||
|
||||
- [ ] Remove `custom` action execution from [`gitops_dispatcher.py`](file:///home/kiskaadee/Projects/active/homelab/Core/scripts/gitops_dispatcher.py)
|
||||
- [ ] Remove `custom` action execution from `gitops_dispatcher.py`
|
||||
- [ ] Migrate `homelab-magnetflix` away from `custom` action
|
||||
- [ ] Implement HMAC-SHA256 webhook signature verification
|
||||
- [ ] Implement trusted repository name → local path mapping (not path from payload)
|
||||
@@ -803,7 +804,7 @@ The refactoring makes that complexity legible — it does not add more.
|
||||
|
||||
- [ ] Write manifest specification v1 (fields, types, defaults, constraints)
|
||||
- [ ] Create `schemas/app-v1.schema.json`
|
||||
- [ ] Implement Pydantic validator in [`appctl_engine.py`](file:///home/kiskaadee/Projects/active/homelab/Core/scripts/appctl_engine.py)
|
||||
- [ ] Implement Pydantic validator in `appctl_engine.py`
|
||||
- [ ] Add `schemaVersion` requirement to all manifests
|
||||
- [ ] Replace imperative action lists with `deployment.strategy` declarations
|
||||
- [ ] Migrate all `~/Sites/*/app.yaml` to v1 schema
|
||||
@@ -821,7 +822,7 @@ The refactoring makes that complexity legible — it does not add more.
|
||||
### P1 — Privilege Boundary
|
||||
|
||||
- [ ] Create dedicated `gitops` Unix user
|
||||
- [ ] Apply systemd hardening directives to [`homeserver.nix`](file:///home/kiskaadee/Projects/active/homelab/Core/nixos/modules/homeserver.nix)
|
||||
- [ ] Apply systemd hardening directives to `homeserver.nix`
|
||||
- [ ] Restrict filesystem access scope
|
||||
- [ ] Document privilege model
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ type: plan
|
||||
status: active
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- homelab
|
||||
- dynu
|
||||
- ddns
|
||||
@@ -14,7 +16,7 @@ tags:
|
||||
|
||||
## 🎯 Goal Description
|
||||
|
||||
Migrate the dynamic DNS gatekeeper daemon from the current Python script to a native, statically compiled **Rust daemon** located at `/home/kiskaadee/Projects/active/ddns-monitor`.
|
||||
Migrate the dynamic DNS gatekeeper daemon from the current Python script to a native, statically compiled **Rust daemon** located at `~/Projects/active/ddns-monitor`.
|
||||
|
||||
This implementation introduces high-frequency 30-second polling and stateful round-robin resolver rotation across 5 public echo providers while eliminating Python interpreter overhead on the headless server. Crucially, it decouples the DDNS update mechanism behind a pluggable `DdnsConnector` trait to support both **Dynu** and **Cloudflare** (overcoming Dynu's free-tier 4-alias quota limit).
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ type: plan
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- gitea
|
||||
- cicd
|
||||
- gitops
|
||||
|
||||
@@ -3,6 +3,7 @@ type: plan
|
||||
status: active
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- homelab
|
||||
- gitea
|
||||
- github
|
||||
|
||||
@@ -3,6 +3,8 @@ type: plan
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- architecture
|
||||
- operations
|
||||
- homelab
|
||||
- homepage
|
||||
- courses
|
||||
@@ -13,8 +15,8 @@ tags:
|
||||
|
||||
## Goal Description
|
||||
Restructure the homelab services by disentangling the **Homepage** dashboard from the **Learning Hub** (courses API & Kanban board):
|
||||
1. **Reintegrate Homepage into Homelab Core** (`/home/kiskaadee/Homelab/Core`): Return Homepage to its natural role as the central infrastructure portal and container status monitor in the Core stack, removing custom DOM-injection scripts (`custom.js`, `custom.css`).
|
||||
2. **Establish Standalone Courses App** (`/home/kiskaadee/Homelab/Sites/courses`): Promote the learning API and its Kanban board into an independent application under `Sites/courses`, equipped with its own `app.yaml`, standalone frontend UI, Turso database connection, and isolated lifecycle.
|
||||
1. **Reintegrate Homepage into Homelab Core** (`~/Homelab/Core`): Return Homepage to its natural role as the central infrastructure portal and container status monitor in the Core stack, removing custom DOM-injection scripts (`custom.js`, `custom.css`).
|
||||
2. **Establish Standalone Courses App** (`~/Homelab/Sites/courses`): Promote the learning API and its Kanban board into an independent application under `Sites/courses`, equipped with its own `app.yaml`, standalone frontend UI, Turso database connection, and isolated lifecycle.
|
||||
3. **Update Orchestrator (`appctl`)**: Direct `appctl sync` to output Homepage configuration to `Core/config/homepage/services.yaml`, ensuring dynamic discovery of all `Sites/*/app.yaml` manifests including the new `courses` site.
|
||||
4. **Decommission `Sites/dashboard`**: Safely transition and retire the deprecated `Sites/dashboard` repository.
|
||||
|
||||
@@ -231,12 +233,12 @@ Ensure `config/homepage` is validated as part of the core repository structure t
|
||||
### Automated Tests
|
||||
1. **Core Structural & Security Invariants**:
|
||||
```bash
|
||||
cd /home/kiskaadee/Homelab/Core
|
||||
cd ~/Homelab/Core
|
||||
uv run --with pytest --with pyyaml pytest tests
|
||||
```
|
||||
2. **Courses Service Unit Tests & Type Check**:
|
||||
```bash
|
||||
cd /home/kiskaadee/Homelab/Sites/courses
|
||||
cd ~/Homelab/Sites/courses
|
||||
uv run python -m unittest discover tests
|
||||
uv run pyright
|
||||
```
|
||||
|
||||
@@ -3,6 +3,8 @@ type: plan
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- architecture
|
||||
- homelab
|
||||
- server
|
||||
- storage
|
||||
@@ -21,9 +23,9 @@ Establish clear, unambiguous directory boundaries across both the Server and Lap
|
||||
> [!NOTE]
|
||||
> The initial proposal for a monolithic `~/Deployments` directory was superseded by the decoupled `~/Core` and `~/Sites` architecture documented in [Homelab Architecture: Appctl & Decentralized Repositories](../../guides/appctl-operations-and-manifest-guide.md) and executed in [Core & Sites Cutover and Testing Plan](../../archive/core-sites-cutover-testing-plan.md).
|
||||
|
||||
### 🖥️ Production Server Layout (`/home/kiskaadee/`)
|
||||
### 🖥️ Production Server Layout (`~/`)
|
||||
```text
|
||||
/home/kiskaadee/
|
||||
~/
|
||||
├── Core/ # Hardened Ingress & Gateway (Traefik, Authelia, Socket-Proxy)
|
||||
├── Sites/ # Decentralized micro-repositories for each container stack
|
||||
├── Brain/ # Synced personal knowledge base & operational docs
|
||||
@@ -37,9 +39,9 @@ Establish clear, unambiguous directory boundaries across both the Server and Lap
|
||||
|
||||
---
|
||||
|
||||
### 💻 Laptop Workstation Layout (`/home/kiskaadee/`)
|
||||
### 💻 Laptop Workstation Layout (`~/`)
|
||||
```text
|
||||
/home/kiskaadee/
|
||||
~/
|
||||
├── Projects/ # Active source code repositories
|
||||
│ └── active/ # Current work trees (e.g. homelab micro-repos, new-repo, dynu-monitor)
|
||||
├── Learn/ # Backend residency and study coursework
|
||||
|
||||
@@ -3,6 +3,7 @@ type: plan
|
||||
status: active
|
||||
project: homelab
|
||||
tags:
|
||||
- operations
|
||||
- homelab
|
||||
- lvm
|
||||
- storage
|
||||
@@ -31,7 +32,7 @@ nvme0n1 (931.5 GB NVMe SSD)
|
||||
|
||||
### 🚨 Critical Diagnostic: 323 GB Desktop Indexer Cache
|
||||
During disk diagnostics, `/home` was found to be 85% full due almost entirely to:
|
||||
* **`/home/kiskaadee/.cache/danksearch` (323 GB)**: Local search indexing daemon (`dsearch`) generated massive cache dumps and CPU overhead.
|
||||
* **`~/.cache/danksearch` (323 GB)**: Local search indexing daemon (`dsearch`) generated massive cache dumps and CPU overhead.
|
||||
* Actual application repositories (`~/Sites`), Brain vault (`~/Brain`), and NixOS configurations (`~/Config`) consume **under 10 GB total**.
|
||||
|
||||
### Target Production Server Layout:
|
||||
|
||||
@@ -3,6 +3,9 @@ type: plan
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- architecture
|
||||
- security
|
||||
- operations
|
||||
- homelab
|
||||
- email
|
||||
- stalwart
|
||||
@@ -63,7 +66,7 @@ flowchart TD
|
||||
|
||||
## 2. Docker Compose Service Definition
|
||||
|
||||
Add the `stalwart` service to [`Core/docker-compose.yml`](file:///home/kiskaadee/Homelab/Core/docker-compose.yml):
|
||||
Add the `stalwart` service to `Core/docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
stalwart:
|
||||
|
||||
@@ -19,14 +19,14 @@ The **Learning Platform** (`Sites/learning`) is an integrated personal developme
|
||||
Rather than being just a static web UI, it is designed as a **hybrid system**:
|
||||
1. **A Web Dashboard**: Visualizing active courses, study streaks, and a DSA pattern mastery matrix.
|
||||
2. **A Tactical CLI Tool**: Zero-friction terminal commands (`learning daily`, `learning draft`, `learning review`) for local problem-solving sessions.
|
||||
3. **An MCP & REST Service**: Acting as the stateful backend consumed by the [Supervisor System](file:///home/kiskaadee/Brain/projects/supervisor/plans/supervisor-system-specification.md) to ambiently monitor learning objectives, active study sessions, and milestone verification.
|
||||
3. **An MCP & REST Service**: Acting as the stateful backend consumed by the [Supervisor System](../../supervisor/plans/supervisor-system-specification.md) to ambiently monitor learning objectives, active study sessions, and milestone verification.
|
||||
|
||||
---
|
||||
|
||||
## 2. Repository Transition & Git History Preservation
|
||||
|
||||
To reuse the full commit history without losing provenance:
|
||||
- Elevate [`Sites/dashboard/learning/`](file:///home/kiskaadee/Homelab/Sites/dashboard/learning) to the root of the repository.
|
||||
- Elevate `Sites/dashboard/learning/` to the root of the repository.
|
||||
- Retire migrated Homepage configuration files (now living permanently in `Core/config/homepage/`).
|
||||
- Rename directory from `Sites/dashboard` to `Sites/learning` (and clean up the empty placeholder `Sites/courses`).
|
||||
- Update `app.yaml`:
|
||||
@@ -76,7 +76,7 @@ Beyond raw course links and basic problem lists, a top-tier learning companion f
|
||||
- **Communication Clarity**: Did you articulate *why* the algorithm works in the Intuition section as you would to an interviewer?
|
||||
- **Alternative Approaches**: Socratic hints toward optimal trade-offs (e.g. hashmap vs two-pointer).
|
||||
3. **Pattern Exposure & Blind-Spot Radar**:
|
||||
- Tracking exposure across the 16 core patterns identified in [`00-practiced-patterns.md`](file:///home/kiskaadee/Brain/practice/LeetCode/00-practiced-patterns.md) (Two Pointers, Sliding Window, Monotonic Stack, Backtracking, DP, Graphs, etc.).
|
||||
- Tracking exposure across the 16 core patterns identified in [`00-practiced-patterns.md`](../../../practice/LeetCode/00-practiced-patterns.md) (Two Pointers, Sliding Window, Monotonic Stack, Backtracking, DP, Graphs, etc.).
|
||||
- Visualizing coverage: *"You have solved 6 HashMap problems, but 0 Sliding Window or Graph problems this month."*
|
||||
4. **Spaced Repetition & Weakness Queue**:
|
||||
- Problems tagged as `struggled` or `need-review` automatically resurface on a Leitner-style schedule (e.g. 3 days, 10 days, 30 days).
|
||||
@@ -94,7 +94,7 @@ Beyond raw course links and basic problem lists, a top-tier learning companion f
|
||||
---
|
||||
|
||||
### Pillar 3: Supervisor & MCP Integration (Autonomous Navigation)
|
||||
Following the [Supervisor System Specification](file:///home/kiskaadee/Brain/projects/supervisor/plans/supervisor-system-specification.md):
|
||||
Following the [Supervisor System Specification](../../supervisor/plans/supervisor-system-specification.md):
|
||||
- Expose an **MCP Server (Model Context Protocol)** directly from the Learning application so AI tools (like Antigravity or Supervisor) can:
|
||||
- `get_daily_challenge()`: Inspect today's problem.
|
||||
- `get_active_curriculum()`: Check what courses or chapters are currently on deck.
|
||||
|
||||
@@ -11,7 +11,7 @@ tags:
|
||||
# ❄️ NixOS Fleet & Declarative System Configuration
|
||||
|
||||
## 🎯 Project Overview
|
||||
This project documents the architecture, flake hierarchy, host specializations, module designs, and operational maintenance for the workstation NixOS configuration managed in [`/home/kiskaadee/Config`](file:///home/kiskaadee/Config).
|
||||
This project documents the architecture, flake hierarchy, host specializations, module designs, and operational maintenance for the workstation NixOS configuration managed in `~/Config`.
|
||||
|
||||
Following the architectural decoupling of the homelab infrastructure into `Core`, `Config` functions as a dedicated standalone configuration for the mobile workstation (`laptop`), structured cleanly around system-level machine concerns (`system/`) and user-session domains (`home/`).
|
||||
|
||||
@@ -85,6 +85,6 @@ graph TD
|
||||
---
|
||||
|
||||
## 🔗 Related Projects & Locations
|
||||
* **Local Flake Repository**: [`/home/kiskaadee/Config`](file:///home/kiskaadee/Config)
|
||||
* **Local Flake Repository**: `~/Config`
|
||||
* **Homelab Services Project**: [Homelab & Infrastructure Planning](../homelab/README.md)
|
||||
|
||||
@@ -38,8 +38,8 @@ Restructured all flat keys into nested YAML mappings encrypted with Age:
|
||||
* Updated all core secret placeholders (`authelia/*`, `traefik/*`, `dynu/*`).
|
||||
|
||||
### 3. Application & DDNS Modules
|
||||
* **[`hosts/server/traefik-deployments.nix`](file:///home/kiskaadee/Config/hosts/server/traefik-deployments.nix)**: Updated secret references to service-scoped keys (`postgres/*`, `mongo/*`, `ollama/*`, `learning/*`, `gitea/*`).
|
||||
* **[`hosts/server/dynu.nix`](file:///home/kiskaadee/Config/hosts/server/dynu.nix)**: Updated DDNS configuration placeholders to `dynu/*` and `system/pdf_decrypt_password`.
|
||||
* **`hosts/server/traefik-deployments.nix`**: Updated secret references to service-scoped keys (`postgres/*`, `mongo/*`, `ollama/*`, `learning/*`, `gitea/*`).
|
||||
* **`hosts/server/dynu.nix`**: Updated DDNS configuration placeholders to `dynu/*` and `system/pdf_decrypt_password`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ tags:
|
||||
|
||||
## Overview
|
||||
|
||||
Following the migration of homelab server infrastructure to the dedicated `Core` repository, the primary system configuration repository ([`/home/kiskaadee/Config`](file:///home/kiskaadee/Config)) was transformed from a multi-host fleet hierarchy into a standalone, domain-driven configuration for the mobile workstation (`laptop`).
|
||||
Following the migration of homelab server infrastructure to the dedicated `Core` repository, the primary system configuration repository (`~/Config`) was transformed from a multi-host fleet hierarchy into a standalone, domain-driven configuration for the mobile workstation (`laptop`).
|
||||
|
||||
Subsequently, all remaining workstation boundaries, compositor residue, and secrets architecture were refined, verified, and successfully activated on the host.
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ We evaluated, designed, and implemented the **Terminal Workspace Subsystem** for
|
||||
- Passed with **0 errors, 0 warnings**.
|
||||
|
||||
### 2. Flake Validation (`nix flake check`)
|
||||
- Ran `nix flake check` on `/home/kiskaadee/Config`.
|
||||
- Ran `nix flake check` on `~/Config`.
|
||||
- All checks (`check-ruff-lint`, `check-ruff-format`, `check-pyright`, `check-shellcheck`) passed cleanly.
|
||||
|
||||
### 3. Laptop Host Dry Build
|
||||
|
||||
@@ -71,4 +71,4 @@ sequenceDiagram
|
||||
## 📑 Project Documents & Plans
|
||||
|
||||
- [**Repository Provisioning CLI Plan**](plans/provisioning-cli-plan.md) — Comprehensive functional specification, trait architecture, API contracts, and implementation milestones.
|
||||
- **Local Implementation Tree**: [`/home/kiskaadee/Projects/active/new-repo`](file:///home/kiskaadee/Projects/active/new-repo)
|
||||
- **Local Implementation Tree**: `/home/kiskaadee/Projects/active/new-repo`
|
||||
@@ -15,7 +15,7 @@ tags:
|
||||
## 🎯 Objective
|
||||
Build a fast, type-safe, and self-contained Rust command-line tool (`new-repo`) to provision repositories across self-hosted Gitea and GitHub with automated push mirroring, template generation, and zero plaintext secret leakage.
|
||||
|
||||
**Repository Location**: [`/home/kiskaadee/Projects/active/new-repo`](file:///home/kiskaadee/Projects/active/new-repo)
|
||||
**Repository Location**: `/home/kiskaadee/Projects/active/new-repo`
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ tags:
|
||||
An evaluation of transitioning from GitHub-hosted Nixpkgs flake references (`github:nixos/nixpkgs/nixos-unstable`) to the official project-hosted channel tarballs (`https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst`), based on the NixOS Discourse community discussion *"PSA: Use nixos.org tarballs for your flake inputs!"*.
|
||||
|
||||
This plan identifies:
|
||||
1. Every location in the [`/home/kiskaadee/Config`](file:///home/kiskaadee/Config) repository and system configuration where this change can be applied.
|
||||
1. Every location in the `~/Config` repository and system configuration where this change can be applied.
|
||||
2. The architectural, performance, and operational trade-offs of making the change.
|
||||
3. A safe execution strategy respecting repository invariants (Build, Never Switch).
|
||||
|
||||
@@ -42,10 +42,10 @@ This plan identifies:
|
||||
|
||||
| Area | Current Declaration | Candidate Change | Recommendation |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **System Flake Input**<br>[`flake.nix:L8`](file:///home/kiskaadee/Config/flake.nix#L8) | `nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";` | `nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst";` | **Recommended** (Primary candidate) |
|
||||
| **System Flake Input**<br>`flake.nix:L8` | `nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";` | `nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst";` | **Recommended** (Primary candidate) |
|
||||
| **System Flake Registry**<br>(CLI `nix run nixpkgs#...`) | Unconfigured (falls back to global registry pointing to `github:NixOS/nixpkgs`) | Add `nix.registry.nixpkgs.flake = inputs.nixpkgs;` to system base | **Recommended** (Ensures CLI tools share the exact channel cache without querying GitHub) |
|
||||
| **Dev Environments Guide**<br>[`docs/development-environments.md:L34`](file:///home/kiskaadee/Config/docs/development-environments.md#L34) | `nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";` | `nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.zst";` | **Recommended** (Documents the faster `nixpkgs-unstable` channel for standalone dev flakes) |
|
||||
| **Antigravity Guide**<br>[`docs/antigravity.md:L97`](file:///home/kiskaadee/Config/docs/antigravity.md#L97) | `nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";` | `nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst";` | **Optional** (Documentation reference) |
|
||||
| **Dev Environments Guide**<br>`docs/development-environments.md:L34` | `nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";` | `nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.zst";` | **Recommended** (Documents the faster `nixpkgs-unstable` channel for standalone dev flakes) |
|
||||
| **Antigravity Guide**<br>`docs/antigravity.md:L97` | `nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";` | `nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst";` | **Optional** (Documentation reference) |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ docs/
|
||||
1. Boot minimal NixOS ISO.
|
||||
2. Partitioning, filesystem formatting, and mounting.
|
||||
3. Generating `system/hardware-configuration.nix`.
|
||||
4. Cloning `Config` to `/home/kiskaadee/Config`.
|
||||
4. Cloning `Config` to `~/Config`.
|
||||
5. Dry build validation: `nix build .#nixosConfigurations.laptop.config.system.build.toplevel --no-link`.
|
||||
6. System installation: `nixos-install --flake .#laptop`.
|
||||
7. Reboot and initial login via `dank-greeter`.
|
||||
|
||||
@@ -14,7 +14,7 @@ tags:
|
||||
|
||||
## Executive Summary & Context
|
||||
|
||||
Following the migration of the homelab infrastructure, Docker stacks, and Traefik edge ingress to the dedicated [`homelab-core`](file:///home/kiskaadee/Projects/active/homelab/Core) repository, the primary system configuration repository ([`/home/kiskaadee/Config`](file:///home/kiskaadee/Config)) transitions from a multi-host fleet manager into a single-purpose, declarative configuration for the mobile workstation host (`laptop`) running Wayland (Niri) and Home Manager.
|
||||
Following the migration of the homelab infrastructure, Docker stacks, and Traefik edge ingress to the dedicated `homelab-core` repository, the primary system configuration repository (`~/Config`) transitions from a multi-host fleet manager into a single-purpose, declarative configuration for the mobile workstation host (`laptop`) running Wayland (Niri) and Home Manager.
|
||||
|
||||
This document combines the **first-principles architectural analysis** of the standalone workstation with the **concrete phased implementation plan** to decommission legacy server files, dissolve the "multi-host tax", and re-align documentation.
|
||||
|
||||
@@ -155,7 +155,7 @@ Phase 2: Workstation Architectural Consolidation
|
||||
- `homeserver.nix` (Core homelab runtime services)
|
||||
- `monitor.py` (WAN IP rotation detector)
|
||||
- `traefik-deployments.nix` (Edge proxy configuration)
|
||||
- *Verification Invariant*: Confirm all homelab services have corresponding canonical representations in [`homelab-core`](file:///home/kiskaadee/Projects/active/homelab/Core/nixos).
|
||||
- *Verification Invariant*: Confirm all homelab services have corresponding canonical representations in `homelab-core`.
|
||||
|
||||
#### 3. User Modules & Workstation Cleanup
|
||||
- **`modules/user/base.nix`**:
|
||||
|
||||
@@ -119,7 +119,7 @@ normalize_name() {
|
||||
```
|
||||
|
||||
### 6.3 Global Collision Policy (Strict Refusal)
|
||||
If multiple paths yield identical normalized session names (e.g. `/home/kiskaadee/Homelab/Core` and `/home/kiskaadee/Projects/archive/core`), validation fails globally:
|
||||
If multiple paths yield identical normalized session names (e.g. `~/Homelab/Core` and `/home/kiskaadee/Projects/archive/core`), validation fails globally:
|
||||
```text
|
||||
ERROR: workspace name collision: 'core'
|
||||
/home/kiskaadee/Homelab/Core
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
type: journal
|
||||
project: homelab
|
||||
date: 2026-09-11
|
||||
tags: [homelab, nixos, migration, cutover]
|
||||
tags:
|
||||
- architecture
|
||||
- operations
|
||||
- homelab
|
||||
- nixos
|
||||
- migration
|
||||
- cutover
|
||||
---
|
||||
|
||||
# homelab-core NixOS Appliance Merged & Documentation Audit Complete
|
||||
|
||||
@@ -3,15 +3,16 @@ type: journal
|
||||
date: 2026-09-13
|
||||
project: homelab
|
||||
tags:
|
||||
- homelab
|
||||
- gitops
|
||||
- security
|
||||
- architecture
|
||||
- operations
|
||||
- homelab
|
||||
- gitops
|
||||
---
|
||||
|
||||
# Homelab Core — Milestone P0: GitOps Trust Boundary Implementation
|
||||
|
||||
**Plan Reference:** [`projects/homelab/plans/architecture-consolidation-implementation-guide.md`](file:///home/kiskaadee/Brain/projects/homelab/plans/architecture-consolidation-implementation-guide.md)
|
||||
**Plan Reference:** [`projects/homelab/plans/architecture-consolidation-implementation-guide.md`](../../projects/homelab/plans/architecture-consolidation-implementation-guide.md)
|
||||
**Status:** Completed & Proven (All P0 Deliverables 1.1–1.5 achieved)
|
||||
|
||||
---
|
||||
@@ -19,35 +20,35 @@ tags:
|
||||
## 🏛️ Completed Deliverables & Commit Chain
|
||||
|
||||
1. **Deliverable 1.1 — Remove Arbitrary `custom` Execution**
|
||||
- **Commit:** [`29dd186`](file:///home/kiskaadee/Projects/active/homelab/Core) `refactor(gitops): remove arbitrary custom execution`
|
||||
- **Commit:** `29dd186` `refactor(gitops): remove arbitrary custom execution`
|
||||
- **Actions:** Removed `shell=True` and `custom:` execution handler from `scripts/gitops_dispatcher.py`. Unsupported actions fail closed.
|
||||
|
||||
2. **Deliverable 1.2 — Trusted Repository Resolution**
|
||||
- **Commit:** [`01acdb4`](file:///home/kiskaadee/Projects/active/homelab/Core) `feat(gitops): add trusted repository resolution`
|
||||
- **Commit:** `01acdb4` `feat(gitops): add trusted repository resolution`
|
||||
- **Actions:** Implemented `resolve_repository(repo_name)` enforcing canonical path resolution, strict regex naming (`^[a-zA-Z0-9][a-zA-Z0-9._-]*$`), directory traversal rejection (`../../etc`), symlink escape rejection, and allowed root containment (`~/Sites`, `~/Brain`).
|
||||
|
||||
3. **Deliverable 1.3 — Webhook Authentication**
|
||||
- **Commit:** [`fa8054a`](file:///home/kiskaadee/Projects/active/homelab/Core) `feat(gitops): add webhook authentication`
|
||||
- **Commit:** `fa8054a` `feat(gitops): add webhook authentication`
|
||||
- **Actions:** Configured HMAC-SHA256 signature verification (`X-Gitea-Signature`) using constant-time comparison (`hmac.compare_digest`). Generated shared secret encrypted via SOPS/Age in `nixos/secrets.yaml` and projected to `/run/secrets/gitops/webhook_secret` via `homeserver.nix`.
|
||||
|
||||
4. **Deliverable 1.4 — Repository, Event, and Branch Admission**
|
||||
- **Commit:** [`c265c3e`](file:///home/kiskaadee/Projects/active/homelab/Core) `feat(gitops): enforce repository/event/branch admission`
|
||||
- **Commit:** `c265c3e` `feat(gitops): enforce repository/event/branch admission`
|
||||
- **Actions:** Implemented `admit_deployment()` verifying event type (`push` only), ref structure (`refs/heads/*` only; tags/PRs rejected), trusted repository identity, manifest validity, and target branch matching policy.
|
||||
|
||||
5. **Deliverable 1.5 — Serialized Asynchronous Deployment with Superseding**
|
||||
- **Commit:** [`5aae4ef`](file:///home/kiskaadee/Projects/active/homelab/Core) `feat(gitops): add serialized asynchronous deployment`
|
||||
- **Commit:** `5aae4ef` `feat(gitops): add serialized asynchronous deployment`
|
||||
- **Actions:** Separated HTTP admission from background execution. Incoming webhooks write atomic pending files and return HTTP 200 immediately. Workers acquire non-blocking per-repository `flock` locks, sequentially running deployments and automatically superseding intermediate pending commits (A running, B queued, C replaces B -> A deploys, then C deploys).
|
||||
|
||||
6. **Deliverables 3.1, 3.2, 3.6 — Automated Testing & CI Invariants**
|
||||
- **Commits:**
|
||||
- [`142697a`](file:///home/kiskaadee/Projects/active/homelab/Core) `test(architecture): add structural invariants and test runner`
|
||||
- [`f4b676b`](file:///home/kiskaadee/Projects/active/homelab/Core) `test(architecture): add compose and socket proxy security invariants`
|
||||
- [`3351466`](file:///home/kiskaadee/Projects/active/homelab/Core) `ci: run architecture and security validation in flake check and gitea actions`
|
||||
- **Actions:** Added automated test runner [`scripts/test`](file:///home/kiskaadee/Projects/active/homelab/Core/scripts/test), structural invariant checks (`tests/structural/`), Compose security invariant checks (`tests/security/test_security_invariants.py`), Nix flake check integration (`checks.x86_64-linux.test-suite` in `flake.nix`), and Gitea Actions CI workflow (`.gitea/workflows/ci.yaml`).
|
||||
- `142697a` `test(architecture): add structural invariants and test runner`
|
||||
- `f4b676b` `test(architecture): add compose and socket proxy security invariants`
|
||||
- `3351466` `ci: run architecture and security validation in flake check and gitea actions`
|
||||
- **Actions:** Added automated test runner `scripts/test`, structural invariant checks (`tests/structural/`), Compose security invariant checks (`tests/security/test_security_invariants.py`), Nix flake check integration (`checks.x86_64-linux.test-suite` in `flake.nix`), and Gitea Actions CI workflow (`.gitea/workflows/ci.yaml`).
|
||||
|
||||
7. **Documentation Synchronization**
|
||||
- **Commit:** [`534ea9e`](file:///home/kiskaadee/Projects/active/homelab/Core) `docs: sync repository documentation with GitOps hardening and automated test invariants`
|
||||
- **Actions:** Synchronized [`README.md`](file:///home/kiskaadee/Projects/active/homelab/Core/README.md) and [`SECURITY.md`](file:///home/kiskaadee/Projects/active/homelab/Core/SECURITY.md) with the hardened GitOps architecture, automated test runner instructions, Docker socket isolation guarantees, and declarative NixOS SOPS checklist.
|
||||
- **Commit:** `534ea9e` `docs: sync repository documentation with GitOps hardening and automated test invariants`
|
||||
- **Actions:** Synchronized `README.md` and `SECURITY.md` with the hardened GitOps architecture, automated test runner instructions, Docker socket isolation guarantees, and declarative NixOS SOPS checklist.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,17 +3,18 @@ type: journal
|
||||
date: 2026-09-14
|
||||
project: homelab
|
||||
tags:
|
||||
- architecture
|
||||
- security
|
||||
- operations
|
||||
- homelab
|
||||
- gitops
|
||||
- security
|
||||
- architecture
|
||||
---
|
||||
|
||||
# Homelab Core — Milestone P0: Final Closure and P1 Transition
|
||||
|
||||
**Plan Reference:** [`projects/homelab/plans/architecture-consolidation-implementation-guide.md`](file:///home/kiskaadee/Brain/projects/homelab/plans/architecture-consolidation-implementation-guide.md)
|
||||
**Plan Reference:** [`projects/homelab/plans/architecture-consolidation-implementation-guide.md`](../../projects/homelab/plans/architecture-consolidation-implementation-guide.md)
|
||||
**Status:** 🔒 100% SEALED & FROZEN (All P0 Deliverables 1.1–1.5 fully hardened and closed)
|
||||
**Latest Commits:** [`f8cbe08`](file:///home/kiskaadee/Projects/homelab/Core) & [`4c9e7a4`](file:///home/kiskaadee/Projects/homelab/Core)
|
||||
**Latest Commits:** `f8cbe08` & `4c9e7a4`
|
||||
|
||||
---
|
||||
|
||||
@@ -23,7 +24,7 @@ Following architectural review of Milestone P0 (GitOps Trust Boundary), two exec
|
||||
|
||||
1. **Temporal Boundary: Revision-Consistent Manifest Validation**
|
||||
- **Problem:** Manifest validation performed strictly during the admission phase examined the working tree at admission time (`HEAD-A`), while background deployment executes after a `git pull` updates the working tree to the target revision (`HEAD-B`). If an untrusted commit updated `app.yaml` with unsupported strategies or changed branch policies, the pre-pull check would have missed it.
|
||||
- **Fix:** In [`scripts/gitops_dispatcher.py`](file:///home/kiskaadee/Projects/homelab/Core/scripts/gitops_dispatcher.py), the worker re-reads and re-validates `app.yaml` immediately after `git pull` updates the working directory. If the pulled manifest contains unsupported actions or invalid branch constraints, deployment fails closed before any commands execute. Validated actions from the pulled revision are adopted for execution.
|
||||
- **Fix:** In `scripts/gitops_dispatcher.py`, the worker re-reads and re-validates `app.yaml` immediately after `git pull` updates the working directory. If the pulled manifest contains unsupported actions or invalid branch constraints, deployment fails closed before any commands execute. Validated actions from the pulled revision are adopted for execution.
|
||||
- **Coverage:** Added automated tests verifying rejection of unsupported actions and policy mismatches introduced post-pull, and adoption of valid updated actions.
|
||||
|
||||
2. **Observable Worker Execution State**
|
||||
@@ -46,17 +47,17 @@ Following architectural review of Milestone P0 (GitOps Trust Boundary), two exec
|
||||
|
||||
## 📋 P0 Commit Summary
|
||||
|
||||
- [`29dd186`](file:///home/kiskaadee/Projects/homelab/Core) `refactor(gitops): remove arbitrary custom execution`
|
||||
- [`01acdb4`](file:///home/kiskaadee/Projects/homelab/Core) `feat(gitops): add trusted repository resolution`
|
||||
- [`fa8054a`](file:///home/kiskaadee/Projects/homelab/Core) `feat(gitops): add webhook authentication`
|
||||
- [`c265c3e`](file:///home/kiskaadee/Projects/homelab/Core) `feat(gitops): enforce repository/event/branch admission`
|
||||
- [`5aae4ef`](file:///home/kiskaadee/Projects/homelab/Core) `feat(gitops): add serialized asynchronous deployment`
|
||||
- [`142697a`](file:///home/kiskaadee/Projects/homelab/Core) `test(architecture): add structural invariants and test runner`
|
||||
- [`f4b676b`](file:///home/kiskaadee/Projects/homelab/Core) `test(architecture): add compose and socket proxy security invariants`
|
||||
- [`3351466`](file:///home/kiskaadee/Projects/homelab/Core) `ci: run architecture and security validation in flake check and gitea actions`
|
||||
- [`534ea9e`](file:///home/kiskaadee/Projects/homelab/Core) `docs: sync repository documentation with GitOps hardening and automated test invariants`
|
||||
- [`f8cbe08`](file:///home/kiskaadee/Projects/homelab/Core) `fix(gitops): enforce revision-consistent manifest validation and worker status observation`
|
||||
- [`4c9e7a4`](file:///home/kiskaadee/Projects/homelab/Core) `docs: document revision-consistent manifest validation and worker status observation`
|
||||
- `29dd186` `refactor(gitops): remove arbitrary custom execution`
|
||||
- `01acdb4` `feat(gitops): add trusted repository resolution`
|
||||
- `fa8054a` `feat(gitops): add webhook authentication`
|
||||
- `c265c3e` `feat(gitops): enforce repository/event/branch admission`
|
||||
- `5aae4ef` `feat(gitops): add serialized asynchronous deployment`
|
||||
- `142697a` `test(architecture): add structural invariants and test runner`
|
||||
- `f4b676b` `test(architecture): add compose and socket proxy security invariants`
|
||||
- `3351466` `ci: run architecture and security validation in flake check and gitea actions`
|
||||
- `534ea9e` `docs: sync repository documentation with GitOps hardening and automated test invariants`
|
||||
- `f8cbe08` `fix(gitops): enforce revision-consistent manifest validation and worker status observation`
|
||||
- `4c9e7a4` `docs: document revision-consistent manifest validation and worker status observation`
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -2,7 +2,15 @@
|
||||
type: journal
|
||||
project: homelab
|
||||
date: 2026-09-14
|
||||
tags: [homelab, incident, rca, hardware, jellyfin, nixos, vaapi]
|
||||
tags:
|
||||
- operations
|
||||
- homelab
|
||||
- incident
|
||||
- rca
|
||||
- hardware
|
||||
- jellyfin
|
||||
- nixos
|
||||
- vaapi
|
||||
---
|
||||
|
||||
# Incident RCA: Unexpected Server Shutdown & Thermal Cut-Off Resolution
|
||||
|
||||
@@ -2,7 +2,19 @@
|
||||
type: journal
|
||||
project: homelab
|
||||
date: 2026-09-15
|
||||
tags: [homelab, email, stalwart, snappymail, lldap, authelia, brevo, dns, deliverability]
|
||||
tags:
|
||||
- architecture
|
||||
- security
|
||||
- operations
|
||||
- homelab
|
||||
- email
|
||||
- stalwart
|
||||
- snappymail
|
||||
- lldap
|
||||
- authelia
|
||||
- brevo
|
||||
- dns
|
||||
- deliverability
|
||||
---
|
||||
|
||||
# Complete Self-Hosted Email Infrastructure & Webmail Deployment (Stalwart, LLDAP, Brevo, SnappyMail)
|
||||
@@ -50,14 +62,14 @@ flowchart TD
|
||||
## 2. Key Accomplishments & Technical Milestones
|
||||
|
||||
### A. Authelia Session Extension
|
||||
- Extended Authelia session and JWT timeouts in [`Core/config/authelia/configuration.yml`](file:///home/kiskaadee/Homelab/Core/config/authelia/configuration.yml):
|
||||
- Extended Authelia session and JWT timeouts in `Core/config/authelia/configuration.yml`:
|
||||
- `expiration: 7d` (7 days maximum session lifetime).
|
||||
- `inactivity: 3d` (3 days idle timeout).
|
||||
- `remember_me: 1M` (1 month persistent cookie).
|
||||
- Live cookie header verified: `authelia_session=...; expires=Tue, 22 Sep 2026`.
|
||||
|
||||
### B. Stalwart Mail Server Core Infrastructure
|
||||
- Deployed **Stalwart Mail Server** (`stalwartlabs/stalwart:v0.16.22`) to [`Core/docker-compose.yml`](file:///home/kiskaadee/Homelab/Core/docker-compose.yml) on `proxy-net`.
|
||||
- Deployed **Stalwart Mail Server** (`stalwartlabs/stalwart:v0.16.22`) to `Core/docker-compose.yml` on `proxy-net`.
|
||||
- **Port Bindings**:
|
||||
- `25:25`: Standard Inbound SMTP from external MTAs.
|
||||
- `465:465`: SMTPS (Implicit TLS Submission).
|
||||
@@ -67,7 +79,7 @@ flowchart TD
|
||||
- Internal `8080`: Traefik HTTPS routing for `https://mail.roadtotech.me`.
|
||||
- **Persistent Storage**:
|
||||
- Configured RocksDB database under `/var/lib/stalwart` mapped to local host directory `./config/stalwart/data`.
|
||||
- Declared `systemd.tmpfiles.rules` in [`Core/nixos/modules/homeserver.nix`](file:///home/kiskaadee/Homelab/Core/nixos/modules/homeserver.nix) to ensure permanent directory permissions (`0777`) across machine reboots, rebuilds, or fresh disaster recoveries.
|
||||
- Declared `systemd.tmpfiles.rules` in `Core/nixos/modules/homeserver.nix` to ensure permanent directory permissions (`0777`) across machine reboots, rebuilds, or fresh disaster recoveries.
|
||||
|
||||
### C. LLDAP Directory Integration & JIT Provisioning
|
||||
- Integrated Stalwart with the internal LLDAP instance (`ldap://lldap:3890`):
|
||||
@@ -132,7 +144,7 @@ flowchart TD
|
||||
## 5. Next Steps & Future Enhancements
|
||||
|
||||
1. **Authelia Live Password Reset Integration**:
|
||||
- Update [`Core/config/authelia/configuration.yml`](file:///home/kiskaadee/Homelab/Core/config/authelia/configuration.yml) to replace `notifier: filesystem` with `notifier: smtp` (`submission://stalwart:587`), enabling instant password reset emails for all LLDAP users.
|
||||
- Update `Core/config/authelia/configuration.yml` to replace `notifier: filesystem` with `notifier: smtp` (`submission://stalwart:587`), enabling instant password reset emails for all LLDAP users.
|
||||
2. **Gitea Mailer Configuration**:
|
||||
- Configure `[mailer]` in Gitea (`Sites/homelab-gitea/`) to send commit, issue, and review notifications from `git@roadtotech.me`.
|
||||
3. **Automated System Alerts**:
|
||||
|
||||
Reference in new issue
Block a user