# meflove/nixos-config architecture

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

- Interactive diagram: https://gitdiagram.com/meflove/nixos-config
- Repository: https://github.com/meflove/nixos-config

## Overview

This repository is a personal, declarative NixOS configuration. The documented user workflow is to adapt the host and hardware settings, configure secrets, then install or update the `nixos-pc` system using the flake with Disko. Reusable modules cover boot, core services, hardware, networking, desktop use, command-line tools, and development; the README describes them as automatically discovered. The graph follows those documented capabilities and relationships only; source excerpts were not provided, so internal module wiring is not inferred.

Main entry points: [`hosts/nixos-pc/default.nix`](https://github.com/meflove/nixos-config/blob/main/hosts/nixos-pc/default.nix) (NixOS PC), [`modules/core`](https://github.com/meflove/nixos-config/tree/main/modules/core) (Core services), [`modules/desktop`](https://github.com/meflove/nixos-config/tree/main/modules/desktop) (Desktop stack), [`modules/development`](https://github.com/meflove/nixos-config/tree/main/modules/development) (Development tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Host configuration"]
  node_nixos_pc["NixOS PC<br/>[default.nix]"]
  node_disko["Disko layout<br/>[disko.nix]"]
  node_generator["Output generator<br/>[generator.nix]"]
end

subgraph group_system["System foundations"]
  node_boot["Boot and kernel"]
  node_core["Core services"]
  node_hardware["Hardware support"]
  node_networking["Networking"]
end

subgraph group_desktop["Desktop environment"]
  node_desktop["Desktop stack"]
  node_wm["Window managers"]
  node_gaming["Gaming stack<br/>[default.nix]"]
end

subgraph group_tools["User tools"]
  node_cli["CLI and shells"]
  node_development["Development tools"]
  node_editor["Neovim environment<br/>[default.nix]"]
end

subgraph group_security["Secrets and security"]
  node_nix_secrets["Primary secrets"]
  node_sops["SOPS secrets"]
  node_nix_secrets_module["Secrets integration<br/>[default.nix]"]
  node_sops_module["SOPS integration<br/>[default.nix]"]
end

node_user(("System user"))
node_disko_install["Disko installer"]

node_user -->|"adapts host"| node_nixos_pc
node_user -->|"configures secrets"| node_nix_secrets
node_user -->|"installs system"| node_disko_install
node_disko_install -->|"installs flake"| node_nixos_pc
node_nixos_pc -->|"uses partitioning"| node_disko
node_nixos_pc -->|"imports modules"| node_boot
node_nixos_pc -->|"imports modules"| node_core
node_nixos_pc -->|"imports modules"| node_hardware
node_nixos_pc -->|"imports modules"| node_networking
node_nixos_pc -->|"imports modules"| node_desktop
node_nixos_pc -->|"imports modules"| node_cli
node_nixos_pc -->|"imports modules"| node_development
node_desktop -->|"includes window managers"| node_wm
node_desktop -->|"includes gaming"| node_gaming
node_development -->|"includes editor"| node_editor
node_core -->|"provides integration"| node_nix_secrets_module
node_core -->|"provides integration"| node_sops_module
node_nix_secrets_module -->|"uses primary backend"| node_nix_secrets
node_sops_module -->|"uses second backend"| node_sops
node_generator -.->|"generates outputs"| node_nixos_pc

click node_nixos_pc "https://github.com/meflove/nixos-config/blob/main/hosts/nixos-pc/default.nix"
click node_disko "https://github.com/meflove/nixos-config/blob/main/hosts/nixos-pc/disko.nix"
click node_boot "https://github.com/meflove/nixos-config/tree/main/modules/boot"
click node_core "https://github.com/meflove/nixos-config/tree/main/modules/core"
click node_hardware "https://github.com/meflove/nixos-config/tree/main/modules/hardware"
click node_networking "https://github.com/meflove/nixos-config/tree/main/modules/networking"
click node_desktop "https://github.com/meflove/nixos-config/tree/main/modules/desktop"
click node_wm "https://github.com/meflove/nixos-config/tree/main/modules/desktop/wm"
click node_gaming "https://github.com/meflove/nixos-config/blob/main/modules/desktop/gaming/default.nix"
click node_cli "https://github.com/meflove/nixos-config/tree/main/modules/cli"
click node_development "https://github.com/meflove/nixos-config/tree/main/modules/development"
click node_editor "https://github.com/meflove/nixos-config/blob/main/modules/development/editor/default.nix"
click node_nix_secrets "https://github.com/meflove/nixos-config/tree/main/nix-secrets"
click node_sops "https://github.com/meflove/nixos-config/tree/main/secrets"
click node_nix_secrets_module "https://github.com/meflove/nixos-config/blob/main/modules/core/nix-secrets/default.nix"
click node_sops_module "https://github.com/meflove/nixos-config/blob/main/modules/core/sops-nix/default.nix"
click node_generator "https://github.com/meflove/nixos-config/blob/main/lib/generator.nix"

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_nixos_pc,node_disko,node_generator,node_user toneBlue
class node_boot,node_core,node_hardware,node_networking toneAmber
class node_desktop,node_wm,node_gaming toneMint
class node_cli,node_development,node_editor toneRose
class node_nix_secrets,node_sops,node_nix_secrets_module,node_sops_module,node_disko_install toneIndigo
```

## Components

### Host configuration

- [NixOS PC](https://github.com/meflove/nixos-config/blob/main/hosts/nixos-pc/default.nix): `hosts/nixos-pc/default.nix`
- [Disko layout](https://github.com/meflove/nixos-config/blob/main/hosts/nixos-pc/disko.nix): `hosts/nixos-pc/disko.nix`
- [Output generator](https://github.com/meflove/nixos-config/blob/main/lib/generator.nix): `lib/generator.nix`

### System foundations

- [Boot and kernel](https://github.com/meflove/nixos-config/tree/main/modules/boot): `modules/boot`
- [Core services](https://github.com/meflove/nixos-config/tree/main/modules/core): `modules/core`
- [Hardware support](https://github.com/meflove/nixos-config/tree/main/modules/hardware): `modules/hardware`
- [Networking](https://github.com/meflove/nixos-config/tree/main/modules/networking): `modules/networking`

### Desktop environment

- [Desktop stack](https://github.com/meflove/nixos-config/tree/main/modules/desktop): `modules/desktop`
- [Window managers](https://github.com/meflove/nixos-config/tree/main/modules/desktop/wm): `modules/desktop/wm`
- [Gaming stack](https://github.com/meflove/nixos-config/blob/main/modules/desktop/gaming/default.nix): `modules/desktop/gaming/default.nix`

### User tools

- [CLI and shells](https://github.com/meflove/nixos-config/tree/main/modules/cli): `modules/cli`
- [Development tools](https://github.com/meflove/nixos-config/tree/main/modules/development): `modules/development`
- [Neovim environment](https://github.com/meflove/nixos-config/blob/main/modules/development/editor/default.nix): `modules/development/editor/default.nix`

### Secrets and security

- [Primary secrets](https://github.com/meflove/nixos-config/tree/main/nix-secrets): `nix-secrets`
- [SOPS secrets](https://github.com/meflove/nixos-config/tree/main/secrets): `secrets`
- [Secrets integration](https://github.com/meflove/nixos-config/blob/main/modules/core/nix-secrets/default.nix): `modules/core/nix-secrets/default.nix`
- [SOPS integration](https://github.com/meflove/nixos-config/blob/main/modules/core/sops-nix/default.nix): `modules/core/sops-nix/default.nix`

### Other components

- **System user**
- **Disko installer**

## Connections

- System user → NixOS PC: adapts host (evidence: `README.md`)
- System user → Primary secrets: configures secrets (evidence: `README.md`)
- System user → Disko installer: installs system (evidence: `README.md`)
- Disko installer → NixOS PC: installs flake (evidence: `README.md`)
- NixOS PC → Disko layout: uses partitioning (evidence: `README.md`)
- NixOS PC → Boot and kernel: imports modules (evidence: `README.md`)
- NixOS PC → Core services: imports modules (evidence: `README.md`)
- NixOS PC → Hardware support: imports modules (evidence: `README.md`)
- NixOS PC → Networking: imports modules (evidence: `README.md`)
- NixOS PC → Desktop stack: imports modules (evidence: `README.md`)
- NixOS PC → CLI and shells: imports modules (evidence: `README.md`)
- NixOS PC → Development tools: imports modules (evidence: `README.md`)
- Desktop stack → Window managers: includes window managers (evidence: `README.md`)
- Desktop stack → Gaming stack: includes gaming (evidence: `README.md`)
- Development tools → Neovim environment: includes editor (evidence: `README.md`)
- Core services → Secrets integration: provides integration (evidence: `README.md`)
- Core services → SOPS integration: provides integration (evidence: `README.md`)
- Secrets integration → Primary secrets: uses primary backend (evidence: `README.md`)
- SOPS integration → SOPS secrets: uses second backend (evidence: `README.md`)
- Output generator → NixOS PC: generates outputs
