# hamburg1r/nixos architecture

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

- Interactive diagram: https://gitdiagram.com/hamburg1r/nixos
- Repository: https://github.com/hamburg1r/nixos

## Overview

1. This repository is a Nix flake–based NixOS configuration, centered around one primary machine profile named `toaster`. The repo is organized as a layered system: shared base configs, host-specific system configs, reusable modules, user-level Home Manager configs, and local package/overlay definitions.

2. The top-level composition likely comes from `flake.nix`, with supporting inputs locked in `flake.lock`. From the tree, the flake appears to assemble:
   - NixOS system outputs for hosts
   - Home Manager modules for user environments
   - custom overlays
   - custom package definitions
   - an optional dev shell / auxiliary output (`shell.nix`, `android/default`)

3. System-wide NixOS settings are split between `hosts/common` and `hosts/toaster`. `hosts/common` contains reusable machine-level concerns such as audio, bluetooth, boot, fonts, networking, hardware/filesystem, and general package sets. `hosts/toaster` then specializes those for the actual device.

4. The `hosts/toaster` subtree is the main machine definition boundary. It breaks out boot behavior, GUI, dev tooling, gaming, language/runtime choices, login, networking, time, users, Syncthing, VM support, and host-specific package selection. That makes the host config the place where the final machine profile is assembled from smaller concerns.

5. Hardware and boot are treated as separate subdomains. Under `hosts/toaster/hardware` you have distinct modules for battery, CPU, disks, filesystem, GPU, and kernel; under `hosts/toaster/boot` you have bootloader, GRUB, and Plymouth. This separation suggests the repo is designed to support machine differences cleanly, especially across hardware and boot-time behavior.

6. There is a small reusable NixOS module layer in `modules/nixos`, including `automount.nix` and `plymouth.nix`. These are cross-host abstractions that can be applied to any machine, distinct from the host-specific `hosts/*` configs.

7. User environment management is handled through Home Manager under `modules/home-manager` and `users/*`. The `modules/home-manager` subtree defines reusable desktop, editor, and theme modules, while `users/common` and `users/hamburgir` define user-specific shell, GUI, theme, and specialisation settings.

8. Desktop/window manager support is a major subsystem. Under `modules/home-manager/desktop` there are configurations for Awesome, Hyprland, i3, Niri, and Sway. Niri gets the most detailed treatment, with separate files for binds, layout, input, output, startup, Xwayland, and debugging, which implies the desktop layer is intended to be composable and environment-specific.

9. Editor/tooling configuration is also split into reusable modules. There are parallel Home Manager stacks for `nixvim` and `nvf`, each with submodules for completion, colors, LSP, treesitter, UI, telescope, snippets, and file manager integration. This indicates editor setup is a first-class subsystem rather than an ad hoc user script collection.

10. `modules/home-manager/theme` and `users/common/theme.nix` centralize visual identity: colors, fonts, cursors, and app-specific theming for things like Hyprland, Kitty, and Tmux. Theme propagation appears to be a cross-cutting concern shared by system, desktop, and terminal configs.

11. The `users/hamburgir` tree is the main user profile. It separates shell behavior, GUI apps, terminal preferences, miscellaneous settings, and specialisation. The GUI subtree further splits terminal choices (`ghostty`, `kitty`, `wezterm`), media, social, and desktop-environment preferences, showing that the user profile owns app-level defaults while the system host owns machine-level enablement.

12. `users/hamburgir/shell` contains the interactive command-line environment: aliases, editor, file manager, media helpers, multiplexer, shell behavior, VCS integration, and Zellij configuration. The included Zellij layouts and themes indicate that terminal workflow is treated as a packaged workspace environment, not just a set of aliases.

13. `pkgs` and `overlays` form the repository’s customization layer for the Nix package set. There are local Vim/Neovim plugins under `pkgs/vim-plugins` such as `autosave-nvim`, `journal.nvim`, `live-server`, and `tiny-code-action`, which suggests the config depends on custom or patched packages that are not available upstream.

14. The main data flow is: flake inputs feed the package set and module system; `hosts/common` plus `hosts/toaster` produce the NixOS machine configuration; `modules/nixos` adds reusable system features; Home Manager modules under `modules/home-manager` and user definitions under `users/*` produce the per-user environment; `pkgs` and `overlays` extend the available packages used by both system and user layers.

15. Operationally, this repo is meant to be installed as a full system configuration, as shown by the README command `nixos-install --flake github:h4m6urg1r#toaster`. The GitHub Actions workflow likely validates the flake build, but the architecture itself is primarily local declarative system composition rather than an application server or service mesh.

Main entry points: [`hosts/toaster/default.nix`](https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/default.nix) (Toaster), [`flake.nix`](https://github.com/hamburg1r/nixos/blob/main/flake.nix) (Flake), [`modules/home-manager/default.nix`](https://github.com/hamburg1r/nixos/blob/main/modules/home-manager/default.nix) (Home Manager), [`hosts/common/default.nix`](https://github.com/hamburg1r/nixos/blob/main/hosts/common/default.nix) (Common host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_root["Repository core"]
  node_flake["Flake<br/>entrypoint<br/>[flake.nix]"]
end

subgraph group_system["NixOS system"]
  node_common["Common host<br/>nixos base<br/>[default.nix]"]
  node_common_boot["Boot base<br/>nixos module<br/>[default.nix]"]
  node_common_hw["Hardware base<br/>nixos module<br/>[default.nix]"]
  node_common_net["Network base<br/>nixos module<br/>[network.nix]"]
  node_common_pkgs["Common packages<br/>nixos module<br/>[default.nix]"]
  node_toaster["Toaster<br/>host profile<br/>[default.nix]"]
  node_toaster_boot["Boot stack<br/>host module<br/>[default.nix]"]
  node_toaster_hw["Hardware stack<br/>host module<br/>[default.nix]"]
  node_toaster_gui["Host GUI<br/>host module<br/>[gui.nix]"]
  node_toaster_dev["Host dev<br/>host module<br/>[dev.nix]"]
  node_toaster_pkgs["Host pkgs<br/>host package set<br/>[default.nix]"]
end

subgraph group_home["Home Manager"]
  node_hm["Home Manager<br/>user layer<br/>[default.nix]"]
  node_desktop["Desktop mods<br/>hm subsystem<br/>[default.nix]"]
  node_editor["Editor mods<br/>hm subsystem<br/>[default.nix]"]
  node_theme["Theme mods<br/>hm subsystem<br/>[default.nix]"]
  node_users_common["Common user<br/>user base<br/>[default.nix]"]
  node_user_hamburgir["hamburgir<br/>user profile<br/>[default.nix]"]
  node_user_shell["User shell<br/>user subsystem<br/>[default.nix]"]
  node_user_gui["User GUI<br/>user subsystem<br/>[default.nix]"]
end

subgraph group_packages["Packages"]
  node_overlays["Overlays<br/>package overlay<br/>[default.nix]"]
  node_pkgs["Local pkgs<br/>package set<br/>[default.nix]"]
end

subgraph group_aux["Auxiliary"]
  node_ci["CI<br/>workflow<br/>[main.yml]"]
  node_shell["Shell<br/>aux output<br/>[shell.nix]"]
  node_android["Android<br/>aux output<br/>[default.nix]"]
end

node_flake -->|"assembles"| node_common
node_flake -->|"assembles"| node_toaster
node_flake -->|"exports"| node_hm
node_flake -->|"extends"| node_overlays
node_flake -->|"provides"| node_pkgs
node_flake -->|"validates"| node_ci
node_flake -->|"exposes"| node_shell
node_flake -->|"exposes"| node_android
node_common -->|"includes"| node_common_boot
node_common -->|"includes"| node_common_hw
node_common -->|"includes"| node_common_net
node_common -->|"includes"| node_common_pkgs
node_toaster -->|"includes"| node_toaster_boot
node_toaster -->|"includes"| node_toaster_hw
node_toaster -->|"includes"| node_toaster_gui
node_toaster -->|"includes"| node_toaster_dev
node_toaster -->|"includes"| node_toaster_pkgs
node_hm -->|"includes"| node_desktop
node_hm -->|"includes"| node_editor
node_hm -->|"includes"| node_theme
node_hm -->|"feeds"| node_users_common
node_hm -->|"feeds"| node_user_hamburgir
node_users_common -->|"shares"| node_user_shell
node_users_common -->|"shares"| node_user_gui
node_user_hamburgir -->|"specializes"| node_user_shell
node_user_hamburgir -->|"specializes"| node_user_gui
node_user_hamburgir -->|"uses"| node_theme
node_toaster -->|"builds on"| node_common
node_toaster -->|"links user env"| node_hm
node_toaster -->|"consumes"| node_overlays
node_toaster -->|"consumes"| node_pkgs

click node_flake "https://github.com/hamburg1r/nixos/blob/main/flake.nix"
click node_ci "https://github.com/hamburg1r/nixos/blob/main/.github/workflows/main.yml"
click node_shell "https://github.com/hamburg1r/nixos/blob/main/shell.nix"
click node_android "https://github.com/hamburg1r/nixos/blob/main/android/default/default.nix"
click node_common "https://github.com/hamburg1r/nixos/blob/main/hosts/common/default.nix"
click node_common_boot "https://github.com/hamburg1r/nixos/blob/main/hosts/common/boot/default.nix"
click node_common_hw "https://github.com/hamburg1r/nixos/blob/main/hosts/common/hardware/default.nix"
click node_common_net "https://github.com/hamburg1r/nixos/blob/main/hosts/common/network.nix"
click node_common_pkgs "https://github.com/hamburg1r/nixos/blob/main/hosts/common/packages/default.nix"
click node_toaster "https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/default.nix"
click node_toaster_boot "https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/boot/default.nix"
click node_toaster_hw "https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/hardware/default.nix"
click node_toaster_gui "https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/gui.nix"
click node_toaster_dev "https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/dev.nix"
click node_toaster_pkgs "https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/packages/default.nix"
click node_hm "https://github.com/hamburg1r/nixos/blob/main/modules/home-manager/default.nix"
click node_desktop "https://github.com/hamburg1r/nixos/blob/main/modules/home-manager/desktop/default.nix"
click node_editor "https://github.com/hamburg1r/nixos/blob/main/modules/home-manager/nixvim/default.nix"
click node_theme "https://github.com/hamburg1r/nixos/blob/main/modules/home-manager/theme/default.nix"
click node_users_common "https://github.com/hamburg1r/nixos/blob/main/users/common/default.nix"
click node_user_hamburgir "https://github.com/hamburg1r/nixos/blob/main/users/hamburgir/default.nix"
click node_user_shell "https://github.com/hamburg1r/nixos/blob/main/users/hamburgir/shell/default.nix"
click node_user_gui "https://github.com/hamburg1r/nixos/blob/main/users/hamburgir/gui/default.nix"
click node_overlays "https://github.com/hamburg1r/nixos/blob/main/overlays/default.nix"
click node_pkgs "https://github.com/hamburg1r/nixos/blob/main/pkgs/default.nix"

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 toneBlue
class node_common,node_common_boot,node_common_hw,node_common_net,node_common_pkgs,node_toaster,node_toaster_boot,node_toaster_hw,node_toaster_gui,node_toaster_dev,node_toaster_pkgs toneAmber
class node_hm,node_desktop,node_editor,node_theme,node_users_common,node_user_hamburgir,node_user_shell,node_user_gui toneMint
class node_overlays,node_pkgs toneRose
class node_ci,node_shell,node_android toneIndigo
```

## Components

### Repository core

Flake entrypoints and composition layer.

- [Flake](https://github.com/hamburg1r/nixos/blob/main/flake.nix): entrypoint · Top-level flake composition and outputs. · `flake.nix`

### NixOS system

Shared machine config and host-specific machine profile.

- [Common host](https://github.com/hamburg1r/nixos/blob/main/hosts/common/default.nix): nixos base · Shared NixOS settings reused by hosts. · `hosts/common/default.nix`
- [Boot base](https://github.com/hamburg1r/nixos/blob/main/hosts/common/boot/default.nix): nixos module · Shared bootloader and EFI setup. · `hosts/common/boot/default.nix`
- [Hardware base](https://github.com/hamburg1r/nixos/blob/main/hosts/common/hardware/default.nix): nixos module · Shared filesystem and hardware-facing settings. · `hosts/common/hardware/default.nix`
- [Network base](https://github.com/hamburg1r/nixos/blob/main/hosts/common/network.nix): nixos module · Shared networking configuration. · `hosts/common/network.nix`
- [Common packages](https://github.com/hamburg1r/nixos/blob/main/hosts/common/packages/default.nix): nixos module · Shared package sets for system utilities. · `hosts/common/packages/default.nix`
- [Toaster](https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/default.nix): host profile · Primary machine profile assembled from shared and local modules. · `hosts/toaster/default.nix`
- [Boot stack](https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/boot/default.nix): host module · Host-specific boot behavior and bootloader choices. · `hosts/toaster/boot/default.nix`
- [Hardware stack](https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/hardware/default.nix): host module · Machine-specific CPU, GPU, disk, battery, and kernel settings. · `hosts/toaster/hardware/default.nix`
- [Host GUI](https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/gui.nix): host module · System-level desktop and graphical enablement. · `hosts/toaster/gui.nix`
- [Host dev](https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/dev.nix): host module · Development tooling and language/runtime choices. · `hosts/toaster/dev.nix`
- [Host pkgs](https://github.com/hamburg1r/nixos/blob/main/hosts/toaster/packages/default.nix): host package set · Host-specific package selection and overrides. · `hosts/toaster/packages/default.nix`

### Home Manager

Reusable user-environment modules and user profiles.

- [Home Manager](https://github.com/hamburg1r/nixos/blob/main/modules/home-manager/default.nix): user layer · Reusable user-environment module composition. · `modules/home-manager/default.nix`
- [Desktop mods](https://github.com/hamburg1r/nixos/blob/main/modules/home-manager/desktop/default.nix): hm subsystem · Window manager and session modules. · `modules/home-manager/desktop/default.nix`
- [Editor mods](https://github.com/hamburg1r/nixos/blob/main/modules/home-manager/nixvim/default.nix): hm subsystem · Neovim/NixVim/NVF configuration stacks. · `modules/home-manager/nixvim/default.nix`
- [Theme mods](https://github.com/hamburg1r/nixos/blob/main/modules/home-manager/theme/default.nix): hm subsystem · Shared visual identity across desktop and terminal apps. · `modules/home-manager/theme/default.nix`
- [Common user](https://github.com/hamburg1r/nixos/blob/main/users/common/default.nix): user base · Shared shell, GUI, theme, and specialisation defaults. · `users/common/default.nix`
- [hamburgir](https://github.com/hamburg1r/nixos/blob/main/users/hamburgir/default.nix): user profile · Primary personalized user environment. · `users/hamburgir/default.nix`
- [User shell](https://github.com/hamburg1r/nixos/blob/main/users/hamburgir/shell/default.nix): user subsystem · Interactive command-line workflow and tool preferences. · `users/hamburgir/shell/default.nix`
- [User GUI](https://github.com/hamburg1r/nixos/blob/main/users/hamburgir/gui/default.nix): user subsystem · Desktop apps, terminals, media, and social defaults. · `users/hamburgir/gui/default.nix`

### Packages

Package overlays and local package definitions.

- [Overlays](https://github.com/hamburg1r/nixos/blob/main/overlays/default.nix): package overlay · Package-set extensions and customization hooks. · `overlays/default.nix`
- [Local pkgs](https://github.com/hamburg1r/nixos/blob/main/pkgs/default.nix): package set · Repo-local package definitions and custom plugins. · `pkgs/default.nix`

### Auxiliary

Extra outputs and automation.

- [CI](https://github.com/hamburg1r/nixos/blob/main/.github/workflows/main.yml): workflow · Build/validation automation for the flake. · `.github/workflows/main.yml`
- [Shell](https://github.com/hamburg1r/nixos/blob/main/shell.nix): aux output · Standalone auxiliary shell entrypoint. · `shell.nix`
- [Android](https://github.com/hamburg1r/nixos/blob/main/android/default/default.nix): aux output · Secondary Android-related default output. · `android/default/default.nix`

## Connections

- Flake → Common host: assembles · Builds shared NixOS modules into host outputs.
- Flake → Toaster: assembles · Exports the main machine configuration.
- Flake → Home Manager: exports · Provides reusable Home Manager module composition.
- Flake → Overlays: extends · Adds package-set overlays.
- Flake → Local pkgs: provides · Makes local packages available to system and users.
- Flake → CI: validates · Runs repository checks in CI.
- Flake → Shell: exposes · Offers an auxiliary shell entrypoint.
- Flake → Android: exposes · Offers an auxiliary Android-related output.
- Common host → Boot base: includes · Shared boot and EFI settings.
- Common host → Hardware base: includes · Shared hardware and filesystem settings.
- Common host → Network base: includes · Shared networking settings.
- Common host → Common packages: includes · Shared package collection.
- Toaster → Boot stack: includes · Host-specific boot stack.
- Toaster → Hardware stack: includes · Host-specific hardware stack.
- Toaster → Host GUI: includes · Host-level graphical configuration.
- Toaster → Host dev: includes · Host-level development configuration.
- Toaster → Host pkgs: includes · Host-level package selection.
- Home Manager → Desktop mods: includes · Desktop and session modules.
- Home Manager → Editor mods: includes · Editor configuration stacks.
- Home Manager → Theme mods: includes · Shared visual theme modules.
- Home Manager → Common user: feeds · Reusable user baseline modules.
- Home Manager → hamburgir: feeds · Primary user profile modules.
- Common user → User shell: shares · Common shell behaviors reused by users.
- Common user → User GUI: shares · Common GUI behaviors reused by users.
- hamburgir → User shell: specializes · Customizes shell workflow for the primary user.
- hamburgir → User GUI: specializes · Customizes GUI and terminal apps for the primary user.
- hamburgir → Theme mods: uses · Consumes shared theme definitions.
- Toaster → Common host: builds on · Host profile starts from shared machine settings.
- Toaster → Home Manager: links user env · Integrates Home Manager into the host.
- Toaster → Overlays: consumes · Uses overlayed package definitions.
- Toaster → Local pkgs: consumes · Uses repo-local packages.
