# bew/dotfiles architecture

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

- Interactive diagram: https://gitdiagram.com/bew/dotfiles
- Repository: https://github.com/bew/dotfiles

## Overview

##### Main Components
a. Core Configuration Management
- Nix Home Manager (central configuration system)
- Installation System (install_bruteforce.bash)
- Git LFS Integration (for binary files)

b. Configuration Categories (organize in distinct sections)
- Shell Environments (zsh, nushell, bash_minimal)
- Text Editors (nvim-wip, nvim-myplugins)
- Terminal Tools (tmux, git, gdb)
- GUI Applications (wezterm, dunst, espanso)
- Windows-specific (.windows directory with AutoHotkey scripts)

##### Component Relationships
- Use a hierarchical structure showing:
- Nix Home Manager at the top level
- Configuration categories as second-level components
- Individual tool configurations as leaf nodes
- Shared resources (like bin/ scripts) as cross-cutting components

##### Design Elements

Use the following visual elements:
- Hexagon: Nix Home Manager (core system)
- Rectangles: Major configuration categories
- Rounded rectangles: Individual tool configurations
- Diamonds: Installation/deployment components

- Blue: Core system components
- Green: Shell/CLI tools
- Orange: GUI applications
- Purple: Development tools
- Gray: Shared utilities

##### Implementation Details

Implementation aspects:
- Nix Modules Structure:
- * homes/ directory (main configurations)
- * modules/ (reusable components)
- * pkgs/ (custom packages)

- Configuration Organization:
- * Tool-specific directories (zsh/, nvim/, etc.)
- * Shared scripts (bin/)
- * Platform-specific configs (.windows/)

##### Data Flow
- Configuration deployment flow:
- Nix Home Manager → Tool Configs → Symlinks
- Git LFS → Binary Assets
- Installation Script → System Integration

##### Integration Points
- Cross-tool integration:
- Shell environment variables
- Shared scripts
- Common configurations

- → Configuration flow
- ⇢ Data/resource sharing
- ⟲ System integration
- 🔧 Tool configuration
- 📁 File storage
- ⚙️ Core system component

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Core System
    subgraph Core["Core Configuration Management"]
        NixHM[("Nix Home Manager")]:::core
        Install["Installation System"]:::core
        GitLFS["Git LFS Integration"]:::core
    end

    %% Configuration Categories
    subgraph Shell["Shell Environments"]
        Zsh["Zsh Config"]:::shell
        Nushell["Nushell Config"]:::shell
        BashMin["Bash Minimal"]:::shell
    end

    subgraph Editors["Text Editors"]
        Neovim["Neovim WIP"]:::editor
        NeovimPlugins["Neovim Plugins"]:::editor
    end

    subgraph Terminal["Terminal Tools"]
        Tmux["Tmux"]:::terminal
        Git["Git"]:::terminal
        GDB["GDB"]:::terminal
    end

    subgraph GUI["GUI Applications"]
        Wezterm["Wezterm"]:::gui
        Dunst["Dunst"]:::gui
        Espanso["Espanso"]:::gui
    end

    subgraph Windows["Windows-Specific"]
        AHK["AutoHotkey Scripts"]:::windows
    end

    subgraph NixImpl["Nix Implementation"]
        NixMod["Nix Modules"]:::nix
        NixPkg["Nix Packages"]:::nix
        ToolFactory["Tool Configs Factory"]:::nix
    end

    subgraph Shared["Shared Resources"]
        BinScripts[("Binary Scripts")]:::shared
        ShellEnv[("Shell Environment")]:::shared
    end

    %% Relationships
    NixHM --> NixImpl
    NixImpl --> Shell
    NixImpl --> Editors
    NixImpl --> Terminal
    NixImpl --> GUI
    Install --> Core
    GitLFS --> BinScripts
    ShellEnv --> Shell
    BinScripts --> Terminal

    %% Styling
    classDef core fill:#2196F3,stroke:#1565C0,color:white
    classDef shell fill:#4CAF50,stroke:#388E3C,color:white
    classDef editor fill:#9C27B0,stroke:#7B1FA2,color:white
    classDef terminal fill:#4CAF50,stroke:#388E3C,color:white
    classDef gui fill:#FF9800,stroke:#F57C00,color:white
    classDef windows fill:#9E9E9E,stroke:#616161,color:white
    classDef nix fill:#2196F3,stroke:#1565C0,color:white
    classDef shared fill:#9E9E9E,stroke:#616161,color:white

    %% Click Events
    click NixHM "https://github.com/bew/dotfiles/tree/main//nix/homes/"
    click Install "https://github.com/bew/dotfiles/blob/main//install_bruteforce.bash"
    click GitLFS "https://github.com/bew/dotfiles/blob/main//.gitattributes"
    click Zsh "https://github.com/bew/dotfiles/tree/main//zsh/"
    click Nushell "https://github.com/bew/dotfiles/tree/main//nushell/"
    click BashMin "https://github.com/bew/dotfiles/tree/main//bash_minimal/"
    click Neovim "https://github.com/bew/dotfiles/tree/main//nvim-wip/"
    click NeovimPlugins "https://github.com/bew/dotfiles/tree/main//nvim-myplugins/"
    click Tmux "https://github.com/bew/dotfiles/tree/main//tmux/"
    click Git "https://github.com/bew/dotfiles/tree/main//git/"
    click GDB "https://github.com/bew/dotfiles/tree/main//gdb/"
    click Wezterm "https://github.com/bew/dotfiles/tree/main//gui/wezterm/"
    click Dunst "https://github.com/bew/dotfiles/tree/main//gui/dunst/"
    click Espanso "https://github.com/bew/dotfiles/tree/main//gui/espanso/"
    click AHK "https://github.com/bew/dotfiles/tree/main//.windows/autohotkey-scripts/"
    click NixMod "https://github.com/bew/dotfiles/tree/main//nix/modules/"
    click NixPkg "https://github.com/bew/dotfiles/tree/main//nix/pkgs/"
    click ToolFactory "https://github.com/bew/dotfiles/tree/main//nix/tool-configs-factory/"
    click BinScripts "https://github.com/bew/dotfiles/tree/main//bin/"
    click ShellEnv "https://github.com/bew/dotfiles/tree/main//shell/"
```
