# sinanmohd/infra architecture

> Architecture diagram of the GitHub repository sinanmohd/infra, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sinanmohd/infra
- Repository: https://github.com/sinanmohd/infra

## Overview

This repository is an infrastructure-as-code collection for personal machines and a Kubernetes cluster. Its principal workflows are configuring a local NixOS/Home Manager machine or deploying a remote NixOS host, and bootstrapping Kubernetes so Argo CD can take over. Kubernetes capabilities are organized as Helm charts with per-chart values and encrypted secrets; OpenTofu holds a Signoz configuration. The README documents the main entry points, but the sampled source is an unrelated desktop customization, so internal deployment wiring beyond those statements is not verified.

Main entry points: [`charts`](https://github.com/sinanmohd/infra/tree/master/charts) (Helm charts), [`nix/os/hosts/cez/default.nix`](https://github.com/sinanmohd/infra/blob/master/nix/os/hosts/cez/default.nix) (Local host config), [`nix/os/hosts/kay/default.nix`](https://github.com/sinanmohd/infra/blob/master/nix/os/hosts/kay/default.nix) (Remote host config), [`apps/bootstrap.yaml`](https://github.com/sinanmohd/infra/blob/master/apps/bootstrap.yaml) (Cluster bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_nix["Nix systems"]
  node_local["Local host config<br/>[default.nix]"]
  node_remote["Remote host config<br/>[default.nix]"]
  node_osmodules["NixOS modules"]
  node_homemodules["Home Manager"]
end

subgraph group_cluster["Kubernetes platform"]
  node_bootstrap["Cluster bootstrap<br/>[bootstrap.yaml]"]
  node_appsets["Argo CD appsets"]
  node_charts["Helm charts"]
  node_values["Chart values"]
end

subgraph group_infra["Infrastructure services"]
  node_data["Data services"]
  node_identity["Identity services"]
  node_observability["Observability"]
  node_storage["Storage services"]
  node_networking["Cluster networking"]
end

subgraph group_ops["Operations"]
  node_tofu["Signoz provisioning"]
end

node_operator(("Operator"))
node_cluster_runtime{{"Kubernetes cluster"}}
node_argocd{{"Argo CD"}}

node_operator -->|"runs locally"| node_local
node_operator -->|"deploys remotely"| node_remote
node_operator -->|"applies bootstrap"| node_bootstrap
node_local -.->|"uses modules"| node_osmodules
node_remote -.->|"uses modules"| node_osmodules
node_local -.->|"configures home"| node_homemodules
node_bootstrap -->|"hands off"| node_argocd
node_argocd -->|"syncs"| node_appsets
node_appsets -.->|"selects charts"| node_charts
node_values -->|"configures"| node_charts
node_charts -.->|"installs into"| node_cluster_runtime
node_charts -.->|"includes"| node_data
node_charts -.->|"includes"| node_identity
node_charts -.->|"includes"| node_observability
node_charts -.->|"includes"| node_storage
node_charts -.->|"includes"| node_networking
node_tofu -.->|"provisions"| node_observability

click node_local "https://github.com/sinanmohd/infra/blob/master/nix/os/hosts/cez/default.nix"
click node_remote "https://github.com/sinanmohd/infra/blob/master/nix/os/hosts/kay/default.nix"
click node_osmodules "https://github.com/sinanmohd/infra/tree/master/nix/os/modules"
click node_homemodules "https://github.com/sinanmohd/infra/tree/master/nix/home"
click node_bootstrap "https://github.com/sinanmohd/infra/blob/master/apps/bootstrap.yaml"
click node_appsets "https://github.com/sinanmohd/infra/tree/master/appsets"
click node_charts "https://github.com/sinanmohd/infra/tree/master/charts"
click node_values "https://github.com/sinanmohd/infra/tree/master/values"
click node_data "https://github.com/sinanmohd/infra/tree/master/charts/postgres"
click node_identity "https://github.com/sinanmohd/infra/tree/master/charts/keycloak"
click node_observability "https://github.com/sinanmohd/infra/tree/master/charts/signoz"
click node_storage "https://github.com/sinanmohd/infra/tree/master/charts/seaweedfs"
click node_networking "https://github.com/sinanmohd/infra/tree/master/charts/istio"
click node_tofu "https://github.com/sinanmohd/infra/tree/master/tofu/signoz"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_local,node_remote,node_osmodules,node_homemodules toneBlue
class node_bootstrap,node_appsets,node_charts,node_values toneAmber
class node_data,node_identity,node_observability,node_storage,node_networking toneMint
class node_tofu toneRose
class node_operator,node_cluster_runtime,node_argocd toneIndigo
```

## Components

### Nix systems

- [Local host config](https://github.com/sinanmohd/infra/blob/master/nix/os/hosts/cez/default.nix): `nix/os/hosts/cez/default.nix`
- [Remote host config](https://github.com/sinanmohd/infra/blob/master/nix/os/hosts/kay/default.nix): `nix/os/hosts/kay/default.nix`
- [NixOS modules](https://github.com/sinanmohd/infra/tree/master/nix/os/modules): `nix/os/modules`
- [Home Manager](https://github.com/sinanmohd/infra/tree/master/nix/home): `nix/home`

### Kubernetes platform

- [Cluster bootstrap](https://github.com/sinanmohd/infra/blob/master/apps/bootstrap.yaml): `apps/bootstrap.yaml`
- [Argo CD appsets](https://github.com/sinanmohd/infra/tree/master/appsets): `appsets`
- [Helm charts](https://github.com/sinanmohd/infra/tree/master/charts): `charts`
- [Chart values](https://github.com/sinanmohd/infra/tree/master/values): `values`

### Infrastructure services

- [Data services](https://github.com/sinanmohd/infra/tree/master/charts/postgres): `charts/postgres`
- [Identity services](https://github.com/sinanmohd/infra/tree/master/charts/keycloak): `charts/keycloak`
- [Observability](https://github.com/sinanmohd/infra/tree/master/charts/signoz): `charts/signoz`
- [Storage services](https://github.com/sinanmohd/infra/tree/master/charts/seaweedfs): `charts/seaweedfs`
- [Cluster networking](https://github.com/sinanmohd/infra/tree/master/charts/istio): `charts/istio`

### Operations

- [Signoz provisioning](https://github.com/sinanmohd/infra/tree/master/tofu/signoz): `tofu/signoz`

### Other components

- **Operator**
- **Kubernetes cluster**
- **Argo CD**

## Connections

- Operator → Local host config: runs locally (evidence: `README.md`)
- Operator → Remote host config: deploys remotely (evidence: `README.md`)
- Operator → Cluster bootstrap: applies bootstrap (evidence: `README.md`)
- Local host config → NixOS modules: uses modules
- Remote host config → NixOS modules: uses modules
- Local host config → Home Manager: configures home
- Cluster bootstrap → Argo CD: hands off (evidence: `README.md`)
- Argo CD → Argo CD appsets: syncs (evidence: `README.md`)
- Argo CD appsets → Helm charts: selects charts
- Chart values → Helm charts: configures (evidence: `README.md`)
- Helm charts → Kubernetes cluster: installs into
- Helm charts → Data services: includes
- Helm charts → Identity services: includes
- Helm charts → Observability: includes
- Helm charts → Storage services: includes
- Helm charts → Cluster networking: includes
- Signoz provisioning → Observability: provisions
