# t4ko0522/dotfiles architecture

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

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

## Overview

1. This repository is a cross-platform dotfiles and machine-configuration system for two environments: NixOS on Linux and a heavily customized Windows setup. It is not an application codebase; the “architecture” is mostly configuration layering and generated user environments.

2. The root Nix flake is the main entrypoint. `flake.nix` and `flake.lock` define the pinned dependency graph, while `nix-configs/` contains the actual NixOS and Home Manager composition. The repo is organized so one source of truth can produce both system-level and user-level environments.

3. The NixOS side is split into reusable modules, host definitions, and profiles. `nix-configs/modules/` contains base services and platform policy such as locale, kernel, Bluetooth, Nix settings, Tailscale, unfree packages, and user/XKB setup. `nix-configs/hosts/desktop` and `nix-configs/hosts/laptop` provide machine-specific hardware and system entrypoints.

4. Home-environment configuration is separated from system configuration. `nix-configs/home.nix` and `nix-configs/home/` assemble user packages, program settings, and desktop integrations, with files like `programs.nix`, `packages.nix`, `waybar.nix`, `swaync.nix`, `zsh.nix`, `xdg.nix`, and `identity.nix` controlling the user session layer.

5. The Linux desktop is composed from smaller profiles rather than one monolithic config. `nix-configs/profiles/` and `nix-configs/home/profiles/` toggle feature bundles such as desktop apps, gaming, NVIDIA, VR, cursor themes, and Wayland-related settings. This makes the environment adaptable by host and use case.

6. Shared application configuration lives in `.config/shared/` and is the main reuse boundary across operating systems. It includes Neovim, WezTerm, Zsh, Yazi, Zed, Starship, Fastfetch, Lazygit, Codex/Claude tooling, and Vim. These configs are intended to be consumed by multiple platforms with minimal duplication.

7. Neovim is one of the largest shared subsystems. `.config/shared/nvim/` uses a modular Lua layout: core config in `lua/config/`, plugin groups in `lua/plugins/`, and extra filetype/spell support. The plugin tree is split into base editor utilities, LSP, UI, and editor integrations, so the editor behavior is assembled from independently managed modules.

8. WezTerm is another notable shared subsystem with its own internal modules. `.config/shared/wezterm/` contains appearance, keymaps, tab/workspace behavior, and statusbar components, plus modules for Claude status, opacity, and WSL-specific behavior. This suggests the terminal emulator is treated as a programmable UI layer rather than just a terminal profile.

9. Windows-specific configuration is isolated under `.config/windows/`. It includes PowerShell profile scripts, Komorebi window-manager configuration and startup scripts, YASB status bar settings, Claude hook integration, a Windows `mise` config, and `whkdrc` hotkeys. This boundary keeps Windows desktop automation separate from the NixOS stack.

10. The Windows desktop also has its own media/visual tooling configuration. `.config/windows/cava/` provides custom shaders and themes, showing that visualizers are configured as part of the desktop experience. This is a local UI subsystem, not a build artifact of the Linux side.

11. The repository also contains Linux desktop dotfiles in `.config/nixos/`, including SwayNC, Waybar, Fcitx5, and Zsh runtime fragments. These appear to complement the Nix-managed Linux environment with per-application runtime files and styling assets.

12. Developer and automation tooling is first-class. `.bin/` contains bootstrap and setup scripts, `justfile` likely provides task entrypoints, and `.github/workflows/checks.yml` handles CI validation. There are also repo templates and shared agent/skill definitions under `.config/shared/claude/` and `.config/shared/codex/`, indicating the repo is designed to be maintained with AI-assisted workflows.

13. Documentation is part of the architecture, not an afterthought. `docs/` contains keybinding maps for Neovim, WezTerm, and Linux window managers like Komorebi/Niri, plus a design document for Windows-NixOS dotfiles. This documentation mirrors the config boundaries, making the navigation model explicit.

14. Overall data flow: Nix flake inputs feed system/home module assembly; those modules activate host/profile combinations; shared dotfiles are then consumed by applications on each OS; and platform-specific scripts wire startup, hooks, and hotkeys. The main boundary lines are NixOS vs Windows, system vs user, and shared app config vs OS-specific overrides.

Main entry points: [`.config/shared`](https://github.com/t4ko0522/dotfiles/blob/master/.config/shared) (Shared dotfiles), [`nix-configs`](https://github.com/t4ko0522/dotfiles/tree/master/nix-configs) (Nix configs), [`.config/windows`](https://github.com/t4ko0522/dotfiles/blob/master/.config/windows) (Windows dotfiles), [`docs`](https://github.com/t4ko0522/dotfiles/tree/master/docs) (Docs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_root["Repo core"]
  node_flake["Flake<br/>nix entrypoint<br/>[flake.nix]"]
  node_automation["Automation<br/>tooling<br/>[.bin]"]
  node_docs["Docs<br/>documentation"]
end

subgraph group_g_nix["NixOS stack"]
  node_nix_configs["Nix configs<br/>system config"]
  node_nix_modules["Modules"]
  node_nix_hosts["Hosts<br/>machine defs"]
  node_nix_profiles["Profiles<br/>feature bundles"]
  node_home_entry["Home<br/>user config<br/>[home.nix]"]
  node_home_bundle["Home tree<br/>user modules"]
  node_linux_runtime["NixOS dotfiles<br/>linux runtime<br/>[nixos]"]
end

subgraph group_g_shared["Shared dotfiles"]
  node_shared_root["Shared dotfiles<br/>cross-platform<br/>[shared]"]
  node_nvim["Neovim<br/>editor stack<br/>[nvim]"]
  node_wezterm["WezTerm<br/>terminal ui<br/>[wezterm]"]
  node_yazi["Yazi<br/>file manager<br/>[yazi]"]
  node_zed["Zed<br/>editor config<br/>[zed]"]
  node_starship["Starship<br/>shell prompt<br/>[starship.toml]"]
  node_vim["Vim<br/>editor config<br/>[vimrc]"]
end

subgraph group_g_windows["Windows stack"]
  node_windows_root["Windows dotfiles<br/>windows config<br/>[windows]"]
  node_pwsh["PowerShell<br/>shell profile<br/>[powershell]"]
  node_komorebi["Komorebi<br/>wm config<br/>[komorebi]"]
  node_yasb["YASB<br/>status bar<br/>[yasb]"]
  node_cava["Cava<br/>visualizer<br/>[cava]"]
end

node_flake -->|"builds"| node_nix_configs
node_nix_configs -->|"imports"| node_nix_modules
node_nix_configs -->|"targets"| node_nix_hosts
node_nix_configs -->|"toggles"| node_nix_profiles
node_nix_configs -->|"creates"| node_home_entry
node_home_entry -->|"includes"| node_home_bundle
node_home_bundle -->|"deploys"| node_linux_runtime
node_home_bundle -.->|"mirrors"| node_nix_profiles
node_shared_root -->|"contains"| node_nvim
node_shared_root -->|"contains"| node_wezterm
node_shared_root -->|"contains"| node_yazi
node_shared_root -->|"contains"| node_zed
node_shared_root -->|"contains"| node_starship
node_shared_root -->|"contains"| node_vim
node_windows_root -->|"contains"| node_pwsh
node_windows_root -->|"contains"| node_komorebi
node_windows_root -->|"contains"| node_yasb
node_windows_root -->|"contains"| node_cava
node_windows_root -.->|"reuses"| node_shared_root
node_nix_configs -.->|"consumes"| node_shared_root
node_automation -->|"supports"| node_flake
node_automation -.->|"documents"| node_docs
node_docs -.->|"covers"| node_nvim
node_docs -.->|"covers"| node_wezterm
node_docs -.->|"covers"| node_windows_root

click node_flake "https://github.com/t4ko0522/dotfiles/blob/master/flake.nix"
click node_nix_configs "https://github.com/t4ko0522/dotfiles/tree/master/nix-configs"
click node_nix_modules "https://github.com/t4ko0522/dotfiles/tree/master/nix-configs/modules"
click node_nix_hosts "https://github.com/t4ko0522/dotfiles/tree/master/nix-configs/hosts"
click node_nix_profiles "https://github.com/t4ko0522/dotfiles/tree/master/nix-configs/profiles"
click node_home_entry "https://github.com/t4ko0522/dotfiles/blob/master/nix-configs/home.nix"
click node_home_bundle "https://github.com/t4ko0522/dotfiles/tree/master/nix-configs/home"
click node_shared_root "https://github.com/t4ko0522/dotfiles/blob/master/.config/shared"
click node_nvim "https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/nvim"
click node_wezterm "https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/wezterm"
click node_yazi "https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/yazi"
click node_zed "https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/zed"
click node_starship "https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/starship.toml"
click node_vim "https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/vim/vimrc"
click node_windows_root "https://github.com/t4ko0522/dotfiles/blob/master/.config/windows"
click node_pwsh "https://github.com/t4ko0522/dotfiles/blob/master/.config/windows/powershell"
click node_komorebi "https://github.com/t4ko0522/dotfiles/blob/master/.config/windows/komorebi"
click node_yasb "https://github.com/t4ko0522/dotfiles/blob/master/.config/windows/yasb"
click node_cava "https://github.com/t4ko0522/dotfiles/blob/master/.config/windows/cava"
click node_linux_runtime "https://github.com/t4ko0522/dotfiles/blob/master/.config/nixos"
click node_automation "https://github.com/t4ko0522/dotfiles/blob/master/.bin"
click node_docs "https://github.com/t4ko0522/dotfiles/tree/master/docs"

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_flake,node_automation,node_docs toneBlue
class node_nix_configs,node_nix_modules,node_nix_hosts,node_nix_profiles,node_home_entry,node_home_bundle,node_linux_runtime toneAmber
class node_shared_root,node_nvim,node_wezterm,node_yazi,node_zed,node_starship,node_vim toneMint
class node_windows_root,node_pwsh,node_komorebi,node_yasb,node_cava toneRose
```

## Components

### Repo core

Flake entrypoints and shared orchestration for the whole dotfiles repository.

- [Flake](https://github.com/t4ko0522/dotfiles/blob/master/flake.nix): nix entrypoint · Root Nix flake and lockfile that pin inputs and expose the repository outputs. · `flake.nix`
- [Automation](https://github.com/t4ko0522/dotfiles/blob/master/.bin): tooling · Bootstrap scripts, task runner, CI checks, and repo-maintenance automation. · `.bin`
- [Docs](https://github.com/t4ko0522/dotfiles/tree/master/docs): documentation · Keybinding references and architecture notes that mirror the config boundaries. · `docs`

### NixOS stack

System and Home Manager composition for Linux machines.

- [Nix configs](https://github.com/t4ko0522/dotfiles/tree/master/nix-configs): system config · Main NixOS and Home Manager composition layer. · `nix-configs`
- [Modules](https://github.com/t4ko0522/dotfiles/tree/master/nix-configs/modules): nixos modules · Reusable system policy modules for locale, Nix, users, kernel, Bluetooth, Tailscale, and related host policy. · `nix-configs/modules`
- [Hosts](https://github.com/t4ko0522/dotfiles/tree/master/nix-configs/hosts): machine defs · Host entrypoints for desktop and laptop machines with hardware-specific system composition. · `nix-configs/hosts`
- [Profiles](https://github.com/t4ko0522/dotfiles/tree/master/nix-configs/profiles): feature bundles · System-level feature bundles such as desktop apps, gaming, NVIDIA, and VR. · `nix-configs/profiles`
- [Home](https://github.com/t4ko0522/dotfiles/blob/master/nix-configs/home.nix): user config · Home Manager entrypoint and user-session composition. · `nix-configs/home.nix`
- [Home tree](https://github.com/t4ko0522/dotfiles/tree/master/nix-configs/home): user modules · User-level modules for programs, packages, desktop integrations, identity, and XDG/session wiring. · `nix-configs/home`
- [NixOS dotfiles](https://github.com/t4ko0522/dotfiles/blob/master/.config/nixos): linux runtime · Linux-side runtime files and styling for desktop apps such as Waybar, SwayNC, Fcitx5, and Zsh fragments. · `.config/nixos`

### Shared dotfiles

Cross-platform application and editor configuration reused by multiple environments.

- [Shared dotfiles](https://github.com/t4ko0522/dotfiles/blob/master/.config/shared): cross-platform · Common application configuration consumed by both Linux and Windows environments. · `.config/shared`
- [Neovim](https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/nvim): editor stack · Large modular Neovim configuration with core Lua config and plugin groups. · `.config/shared/nvim`
- [WezTerm](https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/wezterm): terminal ui · Programmable terminal configuration split into appearance, keymaps, tabs, workspace, and status components. · `.config/shared/wezterm`
- [Yazi](https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/yazi): file manager · Shared file-manager configuration for keymaps, theme, and runtime settings. · `.config/shared/yazi`
- [Zed](https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/zed): editor config · Shared settings and keymaps for the Zed editor. · `.config/shared/zed`
- [Starship](https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/starship.toml): shell prompt · Shared prompt configuration used across shells. · `.config/shared/starship.toml`
- [Vim](https://github.com/t4ko0522/dotfiles/blob/master/.config/shared/vim/vimrc): editor config · Minimal shared Vim runtime configuration. · `.config/shared/vim/vimrc`

### Windows stack

Windows-specific desktop automation, shell, and UI configuration.

- [Windows dotfiles](https://github.com/t4ko0522/dotfiles/blob/master/.config/windows): windows config · Windows-specific configuration boundary for shell, window manager, hooks, and desktop UI. · `.config/windows`
- [PowerShell](https://github.com/t4ko0522/dotfiles/blob/master/.config/windows/powershell): shell profile · PowerShell profile and startup fragments that wire aliases, keybindings, navigation, and mise integration. · `.config/windows/powershell`
- [Komorebi](https://github.com/t4ko0522/dotfiles/blob/master/.config/windows/komorebi): wm config · Windows tiling window-manager configuration, application rules, and startup scripts. · `.config/windows/komorebi`
- [YASB](https://github.com/t4ko0522/dotfiles/blob/master/.config/windows/yasb): status bar · Windows status bar configuration and styling. · `.config/windows/yasb`
- [Cava](https://github.com/t4ko0522/dotfiles/blob/master/.config/windows/cava): visualizer · Windows audio visualizer shaders and themes. · `.config/windows/cava`

## Connections

- Flake → Nix configs: builds · The flake assembles the NixOS and Home Manager outputs.
- Nix configs → Modules: imports · System configuration is composed from reusable modules.
- Nix configs → Hosts: targets · Host definitions provide machine-specific entrypoints.
- Nix configs → Profiles: toggles · Profiles enable optional desktop and hardware bundles.
- Nix configs → Home: creates · The same Nix source tree also produces the user environment.
- Home → Home tree: includes · Home Manager entrypoint pulls in user modules and session wiring.
- Home tree → NixOS dotfiles: deploys · Linux desktop/runtime fragments complement managed user config.
- Home tree → Profiles: mirrors · Some user-level features are paired with system profiles.
- Shared dotfiles → Neovim: contains · Neovim is the largest shared editor subsystem.
- Shared dotfiles → WezTerm: contains · WezTerm is a major shared terminal subsystem.
- Shared dotfiles → Yazi: contains · Shared file-manager configuration lives here.
- Shared dotfiles → Zed: contains · Shared editor settings live here.
- Shared dotfiles → Starship: contains · Shell prompt config is shared across environments.
- Shared dotfiles → Vim: contains · Vim runtime config is kept in the shared boundary.
- Windows dotfiles → PowerShell: contains · PowerShell profiles and startup fragments are the shell layer.
- Windows dotfiles → Komorebi: contains · Komorebi handles tiling, rules, and startup scripts.
- Windows dotfiles → YASB: contains · YASB provides the Windows status bar layer.
- Windows dotfiles → Cava: contains · Cava customizes the Windows visualizer experience.
- Windows dotfiles → Shared dotfiles: reuses · Windows setup reuses cross-platform application configs where possible.
- Nix configs → Shared dotfiles: consumes · Nix-managed environments consume the shared dotfiles boundary.
- Automation → Flake: supports · Scripts and CI validate and bootstrap the repository.
- Automation → Docs: documents · Tooling is paired with navigation and maintenance docs.
- Docs → Neovim: covers · Documentation includes Neovim keybinding maps.
- Docs → WezTerm: covers · Documentation includes WezTerm keybinding maps.
- Docs → Windows dotfiles: covers · Docs include Windows window-manager navigation and design notes.
