# bashfulrobot/nixcfg architecture

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

- Interactive diagram: https://gitdiagram.com/bashfulrobot/nixcfg
- Repository: https://github.com/bashfulrobot/nixcfg

## Overview

##### Component Relationships

- Module dependencies and imports
- System composition flow
- Configuration inheritance patterns
- Service interactions

##### Important Elements to Highlight

- Flake structure (from flake.nix)
- Module auto-import system (from /modules/autoimport.nix)
- Hardware-specific configurations
- Desktop environment setup (GNOME)
- Service configurations

##### Specific Implementation Details

- Desktop file management (/modules/sys/desktop-files)
- Font configuration (/modules/sys/fonts)
- Theme management (/modules/sys/catppuccin-theme)
- Script utilities (/modules/sys/scripts)

##### Notes Section

A notes section explaining:
- The role of the flake.nix in system composition
- How the module system works
- Important configuration patterns
- System bootstrap process

## Diagram (Mermaid)

```mermaid
graph TB
    classDef core fill:#2b6cb0,color:white
    classDef module fill:#38a169,color:white
    classDef config fill:#d69e2e,color:white
    classDef suite fill:#805ad5,color:white
    classDef implementation fill:#e53e3e,color:white
    classDef system fill:#4a5568,color:white

    %% Core System Layer
    subgraph CoreSystem
        NixOS["NixOS Base System"]:::core
        HWConfig["Hardware Configuration"]:::core
        BootConfig["Boot Configuration"]:::core
    end
    click HWConfig "https://github.com/bashfulrobot/nixcfg/blob/main/systems/*/config/hardware-configuration.nix"
    click BootConfig "https://github.com/bashfulrobot/nixcfg/blob/main/systems/*/config/boot.nix"

    %% Module Layer
    subgraph ModuleLayer
        SysMod["System Modules"]:::module
        AppMod["Application Modules"]:::module
        DeskMod["Desktop Modules"]:::module
        CLIMod["CLI Tools"]:::module
        DevMod["Development Tools"]:::module
        HWMod["Hardware Modules"]:::module
    end
    click SysMod "https://github.com/bashfulrobot/nixcfg/tree/main/modules/sys/"
    click AppMod "https://github.com/bashfulrobot/nixcfg/tree/main/modules/apps/"
    click DeskMod "https://github.com/bashfulrobot/nixcfg/tree/main/modules/desktops/"
    click CLIMod "https://github.com/bashfulrobot/nixcfg/tree/main/modules/cli/"
    click DevMod "https://github.com/bashfulrobot/nixcfg/tree/main/modules/dev/"
    click HWMod "https://github.com/bashfulrobot/nixcfg/tree/main/modules/hw/"

    %% Configuration Layer
    subgraph ConfigLayer
        SysConfig["System Configurations"]:::config
        UserConfig["User Configurations"]:::config
        Settings["Settings Management"]:::config
        Secrets["Secrets Management"]:::config
    end
    click SysConfig "https://github.com/bashfulrobot/nixcfg/tree/main/systems/"
    click UserConfig "https://github.com/bashfulrobot/nixcfg/tree/main/modules/users/"
    click Settings "https://github.com/bashfulrobot/nixcfg/blob/main/settings/settings.json"
    click Secrets "https://github.com/bashfulrobot/nixcfg/blob/main/secrets/secrets.json"

    %% Suites
    subgraph Suites
        Content["Content Creation"]:::suite
        Dev["Development"]:::suite
        Entertainment["Entertainment"]:::suite
        Infrastructure["Infrastructure"]:::suite
        K8s["Kubernetes"]:::suite
        Sysdig["Sysdig"]:::suite
        Terminal["Terminal"]:::suite
        Utilities["Utilities"]:::suite
    end
    click Content "https://github.com/bashfulrobot/nixcfg/tree/main/suites/content-creation/"
    click Dev "https://github.com/bashfulrobot/nixcfg/tree/main/suites/dev/"
    click Entertainment "https://github.com/bashfulrobot/nixcfg/tree/main/suites/entertainment/"
    click Infrastructure "https://github.com/bashfulrobot/nixcfg/tree/main/suites/infrastructure/"
    click K8s "https://github.com/bashfulrobot/nixcfg/tree/main/suites/k8s/"
    click Sysdig "https://github.com/bashfulrobot/nixcfg/tree/main/suites/sysdig/"
    click Terminal "https://github.com/bashfulrobot/nixcfg/tree/main/suites/terminal/"
    click Utilities "https://github.com/bashfulrobot/nixcfg/tree/main/suites/utilities/"

    %% Implementation Components
    subgraph Implementation
        DesktopFiles["Desktop File Management"]:::implementation
        Fonts["Font Configuration"]:::implementation
        Theme["Theme Management"]:::implementation
        Scripts["Script Utilities"]:::implementation
    end
    click DesktopFiles "https://github.com/bashfulrobot/nixcfg/tree/main/modules/sys/desktop-files/"
    click Fonts "https://github.com/bashfulrobot/nixcfg/tree/main/modules/sys/fonts/"
    click Theme "https://github.com/bashfulrobot/nixcfg/tree/main/modules/sys/catppuccin-theme/"
    click Scripts "https://github.com/bashfulrobot/nixcfg/tree/main/modules/sys/scripts/"

    %% System Variants
    subgraph Systems
        Digdug["Digdug"]:::system
        Qbert["Qbert"]:::system
        Srv["Srv"]:::system
        CommonServer["Common Server Modules"]:::system
    end
    click Digdug "https://github.com/bashfulrobot/nixcfg/tree/main/systems/digdug/"
    click Qbert "https://github.com/bashfulrobot/nixcfg/tree/main/systems/qbert/"
    click Srv "https://github.com/bashfulrobot/nixcfg/tree/main/systems/srv/"
    click CommonServer "https://github.com/bashfulrobot/nixcfg/tree/main/systems/common-server-modules/"

    %% Core Configuration
    Flake["Flake Configuration"]:::core
    AutoImport["Module Auto-import"]:::core
    click Flake "https://github.com/bashfulrobot/nixcfg/blob/main/flake.nix"
    click AutoImport "https://github.com/bashfulrobot/nixcfg/blob/main/modules/autoimport.nix"

    %% Relationships
    NixOS --> HWConfig
    NixOS --> BootConfig
    ModuleLayer --> ConfigLayer
    ConfigLayer --> Systems
    Suites --> Systems
    Implementation --> SysMod
    Flake --> ModuleLayer
    AutoImport --> ModuleLayer
    CommonServer --> Digdug
    CommonServer --> Qbert
    CommonServer --> Srv

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["Modules"]:::module
        L3["Configuration"]:::config
        L4["Suites"]:::suite
        L5["Implementation"]:::implementation
        L6["System Variants"]:::system
    end
```
