# anthonyenr1quez/dotfiles architecture

> Architecture diagram of the GitHub repository anthonyenr1quez/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/anthonyenr1quez/dotfiles
- Repository: https://github.com/anthonyenr1quez/dotfiles

## Overview

##### Component Breakdown

Core Components (Top Level):
- Flake System (flake.nix) as the entry point
- Host Configurations
- Module System
- Profile Management

**Flake.nix**
- Hosts
- Darwin Hosts (MacBook-Pro-2, damascus, drachenflieger)
- Linux Hosts (mothership)
- WSL Configuration
- Modules
- Common Modules
- Darwin-specific
- NixOS-specific
- Home Manager
- Profiles
- Personal
- Work

##### Detailed Component Relationships

How these components interact:
- Home Manager Modules:
- Terminal Emulators (Ghostty, Kitty)
- Development Tools (Git, IDE)
- Language Support (Go)
- Browser (Firefox)
- Shell (Zsh)

- Platform-specific configurations:
- Darwin: Homebrew, System Preferences
- Linux: NixOS specific configurations
- WSL: Windows Subsystem for Linux specific settings

##### Configuration Flow

- How the flake.nix distributes configurations
- How profiles are applied to specific hosts
- How common modules are shared across platforms
- How home-manager configurations are integrated

##### Notes

Annotations for:
- Build commands for different platforms
- Important configuration paths
- Common modification points
- Integration points with external tools

- The modular nature of the configuration
- Cross-platform compatibility
- Separation of concerns between personal and work profiles
- The central role of the Nix flake system
- Home Manager's role in user environment management

This system design should help developers understand how to navigate, modify, and extend the configuration for different environments while maintaining consistency across platforms.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Core System"
        Flake["Flake System"]
        ModuleSystem["Module System"]
        ProfileMgmt["Profile Management"]
    end

    subgraph "Platform Configurations"
        direction TB
        subgraph "Darwin Config"
            DarwinHosts["Darwin Hosts"]
            DarwinPrefs["System Preferences"]
            DarwinBrew["Homebrew"]
        end

        subgraph "Linux Config"
            LinuxHosts["Linux Hosts"]
            NixOSConfig["NixOS Configuration"]
        end

        subgraph "WSL Config"
            WSLConfig["WSL Configuration"]
        end
    end

    subgraph "Module Components"
        CommonMods["Common Modules"]
        DarwinMods["Darwin Modules"]
        NixOSMods["NixOS Modules"]
        PrimaryConfig["Primary Configuration"]
    end

    subgraph "Profile Types"
        PersonalProfile["Personal Profile"]
        WorkProfile["Work Profile"]
    end

    subgraph "Home Manager"
        direction TB
        subgraph "Development"
            Git["Git Config"]
            IDE["IDE Config"]
            LangSupport["Language Support"]
            Go["Go Support"]
        end

        subgraph "Terminal"
            Ghostty["Ghostty"]
            Kitty["Kitty"]
            Zsh["Zsh Shell"]
        end

        Firefox["Firefox"]
    end

    subgraph "Build & Development"
        GHWorkflows["GitHub Workflows"]
        DevShells["Development Shells"]
        Renovate["Renovate"]
    end

    %% Core relationships
    Flake --> ModuleSystem
    Flake --> ProfileMgmt
    ModuleSystem --> CommonMods
    ModuleSystem --> DarwinMods
    ModuleSystem --> NixOSMods
    ModuleSystem --> PrimaryConfig

    %% Platform relationships
    DarwinMods --> DarwinHosts
    DarwinMods --> DarwinPrefs
    DarwinMods --> DarwinBrew
    NixOSMods --> LinuxHosts
    NixOSMods --> NixOSConfig
    ModuleSystem --> WSLConfig

    %% Profile relationships
    ProfileMgmt --> PersonalProfile
    ProfileMgmt --> WorkProfile

    %% Home Manager relationships
    CommonMods --> Git
    CommonMods --> IDE
    CommonMods --> LangSupport
    LangSupport --> Go
    CommonMods --> Firefox
    CommonMods --> Ghostty
    CommonMods --> Kitty
    CommonMods --> Zsh

    %% Build system relationships
    Flake --> GHWorkflows
    Flake --> DevShells
    Flake --> Renovate

    %% Styling
    classDef core fill:#f9f,stroke:#333,stroke-width:2px
    classDef darwin fill:#a8d1f0,stroke:#333
    classDef linux fill:#90EE90,stroke:#333
    classDef wsl fill:#FFE5B4,stroke:#333
    classDef module fill:#E6E6FA,stroke:#333
    classDef profile fill:#98FB98,stroke:#333
    classDef homemanager fill:#DDA0DD,stroke:#333
    classDef build fill:#F0E68C,stroke:#333

    class Flake,ModuleSystem,ProfileMgmt core
    class DarwinHosts,DarwinPrefs,DarwinBrew darwin
    class LinuxHosts,NixOSConfig linux
    class WSLConfig wsl
    class CommonMods,DarwinMods,NixOSMods,PrimaryConfig module
    class PersonalProfile,WorkProfile profile
    class Git,IDE,LangSupport,Go,Firefox,Ghostty,Kitty,Zsh homemanager
    class GHWorkflows,DevShells,Renovate build

    %% Click events
    click Flake "https://github.com/AnthonyEnr1quez/dotfiles/blob/main/flake.nix"
    click DarwinHosts "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/hosts/darwin"
    click LinuxHosts "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/hosts/linux"
    click WSLConfig "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/modules/wsl"
    click CommonMods "https://github.com/AnthonyEnr1quez/dotfiles/blob/main/modules/common.nix"
    click DarwinMods "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/modules/darwin"
    click NixOSMods "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/modules/nixos"
    click PrimaryConfig "https://github.com/AnthonyEnr1quez/dotfiles/blob/main/modules/primary.nix"
    click PersonalProfile "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/profiles/personal"
    click WorkProfile "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/profiles/work"
    click Ghostty "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/modules/home-manager/terms/ghostty"
    click Kitty "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/modules/home-manager/terms/kitty"
    click Git "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/modules/home-manager/git"
    click IDE "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/modules/home-manager/ide"
    click LangSupport "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/modules/home-manager/langs"
    click Go "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/modules/home-manager/langs/go"
    click Firefox "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/modules/home-manager/firefox"
    click Zsh "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/modules/home-manager/zsh"
    click DarwinPrefs "https://github.com/AnthonyEnr1quez/dotfiles/blob/main/modules/darwin/preferences.nix"
    click DarwinBrew "https://github.com/AnthonyEnr1quez/dotfiles/blob/main/modules/darwin/brew.nix"
    click NixOSConfig "https://github.com/AnthonyEnr1quez/dotfiles/blob/main/modules/nixos/default.nix"
    click GHWorkflows "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/.github/workflows"
    click DevShells "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/shells"
    click Renovate "https://github.com/AnthonyEnr1quez/dotfiles/tree/main/.github/renovate"
```
