# asep5k/nix architecture

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

- Interactive diagram: https://gitdiagram.com/asep5k/nix
- Repository: https://github.com/asep5k/nix

## Overview

This repository is a single-machine NixOS configuration for the Acer Aspire E1-471. Its main workflow is to select the `nixosbtw` host configuration and run `nixos-rebuild`, applying both system and Home Manager configuration. The host combines automatically imported modules for core settings, hardware, networking, desktop tools, and user programs. The README documents these capabilities and the import/rebuild flow; no source excerpts were provided, so internal module-to-module calls are not inferred.

Main entry points: [`modules/hosts/nixosbtw/default.nix`](https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/default.nix) (Host entrypoint), [`modules/hosts/nixosbtw/home.nix`](https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/home.nix) (Home configuration), [`modules/hosts/nixosbtw/configuration.nix`](https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/configuration.nix) (System configuration), [`modules/hosts/nixosbtw/hardware.nix`](https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/hardware.nix) (Host hardware)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Host configuration"]
  node_host_entry["Host entrypoint<br/>[default.nix]"]
  node_system_config["System configuration<br/>[configuration.nix]"]
  node_hardware_config["Host hardware<br/>[hardware.nix]"]
  node_home_config["Home configuration<br/>[home.nix]"]
end

subgraph group_system["System settings"]
  node_boot["Boot settings<br/>[boot.nix]"]
  node_filesystems["Filesystems<br/>[filesystems.nix]"]
  node_nix_settings["Nix settings<br/>[nix.nix]"]
  node_zram["Zram<br/>[zram.nix]"]
  node_hardware["Graphics and firmware"]
  node_network["Network services"]
end

subgraph group_desktop["Desktop environment"]
  node_desktop["Wayland desktop"]
  node_desktop_apps["Desktop applications"]
end

subgraph group_user["User programs"]
  node_cli["CLI tools"]
  node_shells["Shells"]
  node_terminals["Terminals"]
  node_editor["Neovim via nvf"]
  node_dev_tools["Development tools<br/>[dev.nix]"]
end

node_admin(("Administrator"))
node_rebuild["NixOS rebuild"]
node_system_result["NixOS system"]
node_home_result["Home Manager setup"]

node_admin -->|"runs"| node_rebuild
node_rebuild -->|"selects host"| node_host_entry
node_host_entry -->|"defines"| node_system_config
node_host_entry -->|"defines"| node_hardware_config
node_host_entry -->|"defines"| node_home_config
node_system_config -->|"configures"| node_system_result
node_home_config -->|"configures"| node_home_result
node_rebuild -->|"applies"| node_system_result
node_rebuild -->|"applies"| node_home_result
node_host_entry -->|"includes modules"| node_boot
node_host_entry -->|"includes modules"| node_filesystems
node_host_entry -->|"includes modules"| node_nix_settings
node_host_entry -->|"includes modules"| node_zram
node_host_entry -->|"includes modules"| node_hardware
node_host_entry -->|"includes modules"| node_network
node_home_config -->|"includes modules"| node_desktop
node_home_config -->|"includes modules"| node_desktop_apps
node_home_config -->|"includes modules"| node_cli
node_home_config -->|"includes modules"| node_shells
node_home_config -->|"includes modules"| node_terminals
node_home_config -->|"includes modules"| node_editor
node_home_config -->|"includes modules"| node_dev_tools

click node_host_entry "https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/default.nix"
click node_system_config "https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/configuration.nix"
click node_hardware_config "https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/hardware.nix"
click node_home_config "https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/home.nix"
click node_boot "https://github.com/asep5k/nix/blob/main/modules/core/boot.nix"
click node_filesystems "https://github.com/asep5k/nix/blob/main/modules/core/filesystems.nix"
click node_nix_settings "https://github.com/asep5k/nix/blob/main/modules/core/nix.nix"
click node_zram "https://github.com/asep5k/nix/blob/main/modules/core/zram.nix"
click node_hardware "https://github.com/asep5k/nix/tree/main/modules/hardware"
click node_network "https://github.com/asep5k/nix/tree/main/modules/network"
click node_desktop "https://github.com/asep5k/nix/tree/main/modules/desktop"
click node_desktop_apps "https://github.com/asep5k/nix/tree/main/modules/desktop"
click node_cli "https://github.com/asep5k/nix/tree/main/modules/programs/cli"
click node_shells "https://github.com/asep5k/nix/tree/main/modules/programs/shell"
click node_terminals "https://github.com/asep5k/nix/tree/main/modules/programs/terminal"
click node_editor "https://github.com/asep5k/nix/tree/main/modules/programs/nvf"
click node_dev_tools "https://github.com/asep5k/nix/blob/main/modules/programs/dev.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_host_entry,node_system_config,node_hardware_config,node_home_config toneBlue
class node_boot,node_filesystems,node_nix_settings,node_zram,node_hardware,node_network toneAmber
class node_desktop,node_desktop_apps toneMint
class node_cli,node_shells,node_terminals,node_editor,node_dev_tools toneRose
class node_admin,node_rebuild,node_system_result,node_home_result toneIndigo
```

## Components

### Host configuration

- [Host entrypoint](https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/default.nix): `modules/hosts/nixosbtw/default.nix`
- [System configuration](https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/configuration.nix): `modules/hosts/nixosbtw/configuration.nix`
- [Host hardware](https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/hardware.nix): `modules/hosts/nixosbtw/hardware.nix`
- [Home configuration](https://github.com/asep5k/nix/blob/main/modules/hosts/nixosbtw/home.nix): `modules/hosts/nixosbtw/home.nix`

### System settings

- [Boot settings](https://github.com/asep5k/nix/blob/main/modules/core/boot.nix): `modules/core/boot.nix`
- [Filesystems](https://github.com/asep5k/nix/blob/main/modules/core/filesystems.nix): `modules/core/filesystems.nix`
- [Nix settings](https://github.com/asep5k/nix/blob/main/modules/core/nix.nix): `modules/core/nix.nix`
- [Zram](https://github.com/asep5k/nix/blob/main/modules/core/zram.nix): `modules/core/zram.nix`
- [Graphics and firmware](https://github.com/asep5k/nix/tree/main/modules/hardware): `modules/hardware`
- [Network services](https://github.com/asep5k/nix/tree/main/modules/network): `modules/network`

### Desktop environment

- [Wayland desktop](https://github.com/asep5k/nix/tree/main/modules/desktop): `modules/desktop`
- [Desktop applications](https://github.com/asep5k/nix/tree/main/modules/desktop): `modules/desktop`

### User programs

- [CLI tools](https://github.com/asep5k/nix/tree/main/modules/programs/cli): `modules/programs/cli`
- [Shells](https://github.com/asep5k/nix/tree/main/modules/programs/shell): `modules/programs/shell`
- [Terminals](https://github.com/asep5k/nix/tree/main/modules/programs/terminal): `modules/programs/terminal`
- [Neovim via nvf](https://github.com/asep5k/nix/tree/main/modules/programs/nvf): `modules/programs/nvf`
- [Development tools](https://github.com/asep5k/nix/blob/main/modules/programs/dev.nix): `modules/programs/dev.nix`

### Other components

- **Administrator**
- **NixOS rebuild**
- **NixOS system**
- **Home Manager setup**

## Connections

- Administrator → NixOS rebuild: runs (evidence: `README`)
- NixOS rebuild → Host entrypoint: selects host (evidence: `README`)
- Host entrypoint → System configuration: defines (evidence: `README`)
- Host entrypoint → Host hardware: defines (evidence: `README`)
- Host entrypoint → Home configuration: defines (evidence: `README`)
- System configuration → NixOS system: configures (evidence: `README`)
- Home configuration → Home Manager setup: configures (evidence: `README`)
- NixOS rebuild → NixOS system: applies (evidence: `README`)
- NixOS rebuild → Home Manager setup: applies (evidence: `README`)
- Host entrypoint → Boot settings: includes modules (evidence: `README`)
- Host entrypoint → Filesystems: includes modules (evidence: `README`)
- Host entrypoint → Nix settings: includes modules (evidence: `README`)
- Host entrypoint → Zram: includes modules (evidence: `README`)
- Host entrypoint → Graphics and firmware: includes modules (evidence: `README`)
- Host entrypoint → Network services: includes modules (evidence: `README`)
- Home configuration → Wayland desktop: includes modules (evidence: `README`)
- Home configuration → Desktop applications: includes modules (evidence: `README`)
- Home configuration → CLI tools: includes modules (evidence: `README`)
- Home configuration → Shells: includes modules (evidence: `README`)
- Home configuration → Terminals: includes modules (evidence: `README`)
- Home configuration → Neovim via nvf: includes modules (evidence: `README`)
- Home configuration → Development tools: includes modules (evidence: `README`)
