# givikuna/nixfiles architecture

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

- Interactive diagram: https://gitdiagram.com/givikuna/nixfiles
- Repository: https://github.com/givikuna/nixfiles

## Overview

nixfiles is a personal NixOS configuration, built around a Hyprland desktop. Its documented user journey is to run the installer on a fresh NixOS installation, reboot, and arrive at a configured system. The tree indicates that host definitions and shared NixOS modules describe system-specific configuration, while Home Manager modules, desktop profiles, dotfiles, and package definitions shape the user environment. The source excerpts do not show how these configuration layers are wired together, so those relationships are marked unverified; only the install flow is documented in the README.

Main entry points: [`hosts`](https://github.com/givikuna/nixfiles/tree/main/hosts) (Host configurations), [`home-manager/hosts`](https://github.com/givikuna/nixfiles/tree/main/home-manager/hosts) (User host profiles), [`home-manager/modules`](https://github.com/givikuna/nixfiles/tree/main/home-manager/modules) (User modules), [`flake-modules/outputs.nix`](https://github.com/givikuna/nixfiles/blob/main/flake-modules/outputs.nix) (Flake outputs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_system["Host system"]
  node_flake["Flake outputs<br/>[outputs.nix]"]
  node_hostconfigs["Host configurations"]
  node_sharedsystem["Shared system modules"]
  node_hostprofiles["Host profiles"]
end

subgraph group_userenv["User environment"]
  node_hmhosts["User host profiles"]
  node_hmcommon["Common user config<br/>[common.nix]"]
  node_hmmodules["User modules"]
end

subgraph group_desktop["Desktop and apps"]
  node_desktopprofiles["Desktop profiles"]
  node_appmodules["Application modules"]
  node_packages["Package definitions"]
  node_dotfiles["Application dotfiles"]
end

subgraph group_operations["Operations"]
  node_installer["Installer<br/>[install.sh]"]
  node_secrets["Secret configuration<br/>[ynternals.nix]"]
  node_rebuild["Rebuild helper<br/>[rebuild-system.py]"]
end

node_user(("System user"))
node_nixos["Configured NixOS system"]

node_user -->|"runs"| node_installer
node_installer -->|"installs"| node_nixos
node_flake -.->|"selects host"| node_hostconfigs
node_hostconfigs -.->|"uses modules"| node_sharedsystem
node_flake -.->|"selects profile"| node_hostprofiles
node_hostprofiles -.->|"pairs user config"| node_hmhosts
node_hmhosts -.->|"uses defaults"| node_hmcommon
node_hmhosts -.->|"uses modules"| node_hmmodules
node_hmmodules -.->|"includes profiles"| node_desktopprofiles
node_hmmodules -.->|"includes apps"| node_appmodules
node_appmodules -.->|"configures packages"| node_packages
node_desktopprofiles -.->|"configures apps"| node_dotfiles
node_hostconfigs -.->|"uses secrets"| node_secrets
node_user -.->|"runs rebuild"| node_rebuild
node_rebuild -.->|"rebuilds system"| node_flake

click node_installer "https://github.com/givikuna/nixfiles/blob/main/install.sh"
click node_flake "https://github.com/givikuna/nixfiles/blob/main/flake-modules/outputs.nix"
click node_hostconfigs "https://github.com/givikuna/nixfiles/tree/main/hosts"
click node_sharedsystem "https://github.com/givikuna/nixfiles/tree/main/hosts/_modules"
click node_hostprofiles "https://github.com/givikuna/nixfiles/tree/main/nixtants/hosts"
click node_hmhosts "https://github.com/givikuna/nixfiles/tree/main/home-manager/hosts"
click node_hmcommon "https://github.com/givikuna/nixfiles/blob/main/home-manager/common.nix"
click node_hmmodules "https://github.com/givikuna/nixfiles/tree/main/home-manager/modules"
click node_desktopprofiles "https://github.com/givikuna/nixfiles/tree/main/home-manager/modules/desktop"
click node_appmodules "https://github.com/givikuna/nixfiles/tree/main/home-manager/modules/apps"
click node_packages "https://github.com/givikuna/nixfiles/tree/main/home-manager/packages"
click node_dotfiles "https://github.com/givikuna/nixfiles/tree/main/dotfiles"
click node_secrets "https://github.com/givikuna/nixfiles/blob/main/hosts/_modules/secrets/ynternals.nix"
click node_rebuild "https://github.com/givikuna/nixfiles/blob/main/scripts/rebuild-system.py"

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_hostconfigs,node_sharedsystem,node_hostprofiles,node_user toneBlue
class node_hmhosts,node_hmcommon,node_hmmodules toneAmber
class node_desktopprofiles,node_appmodules,node_packages,node_dotfiles toneMint
class node_installer,node_secrets,node_rebuild toneRose
class node_nixos toneIndigo
```

## Components

### Host system

- [Flake outputs](https://github.com/givikuna/nixfiles/blob/main/flake-modules/outputs.nix): `flake-modules/outputs.nix`
- [Host configurations](https://github.com/givikuna/nixfiles/tree/main/hosts): `hosts`
- [Shared system modules](https://github.com/givikuna/nixfiles/tree/main/hosts/_modules): `hosts/_modules`
- [Host profiles](https://github.com/givikuna/nixfiles/tree/main/nixtants/hosts): `nixtants/hosts`

### User environment

- [User host profiles](https://github.com/givikuna/nixfiles/tree/main/home-manager/hosts): `home-manager/hosts`
- [Common user config](https://github.com/givikuna/nixfiles/blob/main/home-manager/common.nix): `home-manager/common.nix`
- [User modules](https://github.com/givikuna/nixfiles/tree/main/home-manager/modules): `home-manager/modules`

### Desktop and apps

- [Desktop profiles](https://github.com/givikuna/nixfiles/tree/main/home-manager/modules/desktop): `home-manager/modules/desktop`
- [Application modules](https://github.com/givikuna/nixfiles/tree/main/home-manager/modules/apps): `home-manager/modules/apps`
- [Package definitions](https://github.com/givikuna/nixfiles/tree/main/home-manager/packages): `home-manager/packages`
- [Application dotfiles](https://github.com/givikuna/nixfiles/tree/main/dotfiles): `dotfiles`

### Operations

- [Installer](https://github.com/givikuna/nixfiles/blob/main/install.sh): `install.sh`
- [Secret configuration](https://github.com/givikuna/nixfiles/blob/main/hosts/_modules/secrets/ynternals.nix): `hosts/_modules/secrets/ynternals.nix`
- [Rebuild helper](https://github.com/givikuna/nixfiles/blob/main/scripts/rebuild-system.py): `scripts/rebuild-system.py`

### Other components

- **System user**
- **Configured NixOS system**

## Connections

- System user → Installer: runs (evidence: `README.md`)
- Installer → Configured NixOS system: installs (evidence: `README.md`)
- Flake outputs → Host configurations: selects host
- Host configurations → Shared system modules: uses modules
- Flake outputs → Host profiles: selects profile
- Host profiles → User host profiles: pairs user config
- User host profiles → Common user config: uses defaults
- User host profiles → User modules: uses modules
- User modules → Desktop profiles: includes profiles
- User modules → Application modules: includes apps
- Application modules → Package definitions: configures packages
- Desktop profiles → Application dotfiles: configures apps
- Host configurations → Secret configuration: uses secrets
- System user → Rebuild helper: runs rebuild
- Rebuild helper → Flake outputs: rebuilds system
