How t4ko0522/dotfiles works
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: shared Shared dotfiles · nix-configs Nix configs · windows Windows dotfiles · docs Docs
Components 22
Repo core
Flake entrypoints and shared orchestration for the whole dotfiles repository.
- Flake · Root Nix flake and lockfile that pin inputs and expose the repository outputs.
flake.nix - Automation · Bootstrap scripts, task runner, CI checks, and repo-maintenance automation.
.bin - Docs · Keybinding references and architecture notes that mirror the config boundaries.
docs
NixOS stack
System and Home Manager composition for Linux machines.
- Nix configs · Main NixOS and Home Manager composition layer.
nix-configs - Modules · Reusable system policy modules for locale, Nix, users, kernel, Bluetooth, Tailscale, and related host policy.
nix-configs/modules - Hosts · Host entrypoints for desktop and laptop machines with hardware-specific system composition.
nix-configs/hosts - Profiles · System-level feature bundles such as desktop apps, gaming, NVIDIA, and VR.
nix-configs/profiles - Home · Home Manager entrypoint and user-session composition.
nix-configs/home.nix - Home tree · User-level modules for programs, packages, desktop integrations, identity, and XDG/session wiring.
nix-configs/home - NixOS dotfiles · 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 · Common application configuration consumed by both Linux and Windows environments.
.config/shared - Neovim · Large modular Neovim configuration with core Lua config and plugin groups.
.config/shared/nvim - WezTerm · Programmable terminal configuration split into appearance, keymaps, tabs, workspace, and status components.
.config/shared/wezterm - Yazi · Shared file-manager configuration for keymaps, theme, and runtime settings.
.config/shared/yazi - Zed · Shared settings and keymaps for the Zed editor.
.config/shared/zed - Starship · Shared prompt configuration used across shells.
.config/shared/starship.toml - Vim · Minimal shared Vim runtime configuration.
.config/shared/vim/vimrc
Windows stack
Windows-specific desktop automation, shell, and UI configuration.
- Windows dotfiles · Windows-specific configuration boundary for shell, window manager, hooks, and desktop UI.
.config/windows - PowerShell · PowerShell profile and startup fragments that wire aliases, keybindings, navigation, and mise integration.
.config/windows/powershell - Komorebi · Windows tiling window-manager configuration, application rules, and startup scripts.
.config/windows/komorebi - YASB · Windows status bar configuration and styling.
.config/windows/yasb - Cava · Windows audio visualizer shaders and themes.
.config/windows/cava
Connections 25
- 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.