# zdcthomas/yakko_wakko architecture

> Architecture diagram of the GitHub repository zdcthomas/yakko_wakko, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zdcthomas/yakko_wakko
- Repository: https://github.com/zdcthomas/yakko_wakko

## Overview

This project is a personal dotfiles repository—a central store for all the configuration files that tailor your development environment and system settings. It leverages Nix (including the Flakes feature) to manage different machines and incorporates configurations for applications like Neovim, tmux, i3, Hammerspoon, polybar, and even custom keyboard layouts (in ergo_layouts). The overall purpose is to maintain a single, version‐controlled source of configuration that can be deployed across several systems, each with its own specific tweaks.

##### Main components
- Dotfiles Repository Core – Represents the entire repository as a tool for personal environment configuration.
- Nix Configuration – This component contains “nix”, “flake.nix”, “flake.lock”, and host-specific subdirectories (e.g., nix/hosts/*). It manages system definitions (NixOS, home-manager modules) and overlays.
- Application Configurations – Located in “config”, with separate folders for Neovim (nvim), i3, Hammerspoon, Polybar, tofi, yabairc, zellij, etc. Each folder corresponds to a specific application’s setup.
- Editor and Plugins – Under config/nvim, there is an extensive layout of lua files, plugins definitions, ftplugins, snippets, and additional settings. This represents the Neovim ecosystem.
- Auxiliary Scripts and Assets – Files like bootstrap.sh, remote_install.sh, and images that serve for installation and visual documentation.
- Ergo Layouts – Dedicated folder for keyboard firmware or layout configurations, which likely interfaces with hardware customization.

##### Relationships and interactions
- External scripts (like bootstrap.sh or remote_install.sh) can be shown as feeders into the setup process—initiating the deployment by pulling in Nix configurations and applying dotfiles.
- The ergo_layouts directory can be represented as a specialized module that supports hardware configuration, linking to the “config” and possibly to other machine-specific Nix modules.

##### Architectural patterns and design principles
- Extensibility: The layered approach (with config files that may include templating) makes it easy to extend or modify parts of the configuration independently.
- Declarative management: Nix is used for a declarative approach, so illustrate that by showing how host configuration files (nix/hosts/*) are fed into the overall system configuration.

##### Technologies and frameworks
- Nix/NixOS & Flakes – For machine configuration and deployment.
- Neovim (with Lua plugins) – For editor configuration.
- i3, Polybar, Tmux, Hammerspoon, etc. – For window management and other UI related configurations.
- Shell and scripting (bootstrap.sh, remote_install.sh) – For installation/bootstrapping.

## Diagram (Mermaid)

```mermaid
flowchart TD
    core["Dotfiles Repository Core"]:::core

    subgraph "Nix Configuration"
        nixConfig["Nix Configuration"]:::nix
        deployment["Deployment Engine (Nix Flakes)"]:::nix
        hosts["Host-specific Configs"]:::nix
        nixConfig --> deployment
        deployment --> hosts
    end

    subgraph "Application Configurations"
        appConfig["Application Configurations"]:::app
        neovim["Neovim Setup"]:::app
        i3["i3 Window Manager Config"]:::app
        hammerspoon["Hammerspoon Config"]:::app
        polybar["Polybar Config"]:::app
        tofi["Tofi Config"]:::app
        appConfig --> neovim
        appConfig --> i3
        appConfig --> hammerspoon
        appConfig --> polybar
        appConfig --> tofi
    end

    ergo["Ergo Layouts"]:::ergo

    aux["Auxiliary Scripts and Assets"]:::aux

    %% Top-level connections from core repository
    core --> nixConfig
    core --> appConfig
    core --> ergo
    core --> aux

    %% Nix provisioning to Application Configurations
    nixConfig -->|"provisions"| neovim
    nixConfig -->|"provisions"| i3
    nixConfig -->|"provisions"| hammerspoon
    nixConfig -->|"provisions"| polybar
    nixConfig -->|"provisions"| tofi

    %% Nix integrates with Ergo Layouts
    nixConfig -->|"integrates"| ergo

    %% Auxiliary scripts trigger deployment via Nix
    aux -->|"initiates"| nixConfig

    %% Ergo Layouts customizes application settings
    ergo -->|"customizes"| appConfig

    %% Click Events
    click core "https://github.com/zdcthomas/yakko_wakko/tree/main/Repository Root"
    click nixConfig "https://github.com/zdcthomas/yakko_wakko/tree/main/flake.nix, flake.lock, nix/"
    click appConfig "https://github.com/zdcthomas/yakko_wakko/tree/main/config/"
    click neovim "https://github.com/zdcthomas/yakko_wakko/tree/main/config/nvim/"
    click i3 "https://github.com/zdcthomas/yakko_wakko/tree/main/config/i3/"
    click hammerspoon "https://github.com/zdcthomas/yakko_wakko/tree/main/config/hammerspoon/"
    click polybar "https://github.com/zdcthomas/yakko_wakko/tree/main/config/polybar/"
    click tofi "https://github.com/zdcthomas/yakko_wakko/tree/main/config/tofi/"
    click aux "https://github.com/zdcthomas/yakko_wakko/tree/main/bootstrap.sh, remote_install.sh, resume.md, images/"
    click ergo "https://github.com/zdcthomas/yakko_wakko/tree/main/ergo_layouts/"

    %% Styles and Classes
    classDef core fill:#FFD700,stroke:#333,stroke-width:2px;
    classDef nix fill:#8FBC8F,stroke:#333,stroke-width:2px;
    classDef app fill:#ADD8E6,stroke:#333,stroke-width:2px;
    classDef aux fill:#DA70D6,stroke:#333,stroke-width:2px;
    classDef ergo fill:#FFA500,stroke:#333,stroke-width:2px;

    class core core;
    class nixConfig,deployment,hosts nix;
    class appConfig,neovim,i3,hammerspoon,polybar,tofi app;
    class aux aux;
    class ergo ergo;
```
