# minegameytb/nurpkgs-repo architecture

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

- Interactive diagram: https://gitdiagram.com/minegameytb/nurpkgs-repo
- Repository: https://github.com/minegameytb/nurpkgs-repo

## Overview

1. This repository is a Nix-based package collection for NUR, not a single application. Its main role is to publish reusable packages, overlays, and possibly NixOS/home-manager modules from a personal Nix flake.

2. The top-level architecture is organized around Nix entrypoints: `flake.nix`, `default.nix`, `overlay.nix`, and `ci.nix`. These are the primary integration surfaces for consumers, while `pkgs/`, `modules/`, `overlays/`, and `lib/` contain the reusable building blocks.

3. `pkgs/` is the core payload. It is split into functional groups:
   - `pkgs/editor/` for editor-related software (`msedit`, `msedit-bin`)
   - `pkgs/misc/` for utility/auxiliary packages (`GLFfetch`)
   - `pkgs/theme/` for theming assets or shell customizations (`marble-shell-filled`)
   - `pkgs/tools/` for standalone tools (`gsettings-diff`, `kvm-archive`, `sshrm`, `fhsEnv-shell`)
   - `pkgs/buildSupport/` for shared build infrastructure, including Rust toolchain support via `rust-fenix`

4. Each package lives in its own subdirectory with a `default.nix`, which means the repository is structured as a collection of independently buildable derivations rather than one monolith. The package tree is the main “leaf layer” where actual software definitions live.

5. `pkgs/buildSupport/rust-fenix/` is an important shared dependency layer. It likely centralizes Rust build inputs and toolchain selection, especially nightly support, so Rust-based packages can share consistent compiler/tooling configuration.

6. `overlays/` and `overlay.nix` form the consumption layer for downstream Nix users. This is how the repo can extend `nixpkgs` with its custom packages, making them available in other Nix configurations without importing the repository manually per package.

7. `modules/` suggests higher-level NixOS or Home Manager integration. These modules are separate from packages, so they likely configure system/user behavior around some of the tools or themes rather than building software themselves.

8. `lib/` is a shared helper layer for internal Nix functions and package construction logic. This usually acts as a boundary between repetitive packaging patterns and the individual package definitions.

9. The repo includes automation and distribution plumbing: `.github/workflows/build.yml` for CI builds, `dependabot.yml` for dependency updates, and `flake.lock`/`flake.nix` for reproducible inputs. This indicates a release pipeline that validates packages before publishing them through NUR and cache infrastructure.

10. Caching is a first-class part of the architecture. The README points to a Cachix cache (`minegameytb.cachix.org`), and the workflow badge suggests CI builds populate that cache so downstream users can avoid rebuilding packages locally.

11. `build.sh`, `Makefile`, and scripts under `script/` (`fix-syntax`, `update-flake`) are repository maintenance tools. They support formatting, validation, and flake input updates rather than runtime functionality.

12. Overall data flow is: Nix source definitions in `pkgs/`, `lib/`, and `buildSupport/` feed flake/overlay/module entrypoints; CI builds those derivations; successful builds are published to Cachix and exposed through the NUR repository interface for downstream Nix consumers.

Main entry points: [`pkgs`](https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs) (pkgs/), [`pkgs/tools`](https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/tools) (tools), [`flake.nix`](https://github.com/minegameytb/nurpkgs-repo/blob/master/flake.nix) (flake.nix), [`pkgs/editor`](https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/editor) (editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entrypoints["Entry points"]
  node_flake["flake.nix<br/>flake entrypoint<br/>[flake.nix]"]
  node_default["default.nix<br/>repo entrypoint<br/>[default.nix]"]
  node_overlay["overlay.nix<br/>overlay entrypoint<br/>[overlay.nix]"]
  node_ci["ci.nix<br/>CI entrypoint<br/>[ci.nix]"]
end

subgraph group_packages["Packages"]
  node_pkgs_index[("pkgs/<br/>package set")]
  node_pkg_editor["editor<br/>package group"]
  node_msedit["msedit<br/>[default.nix]"]
  node_msedit_bin["msedit-bin<br/>[default.nix]"]
  node_pkg_misc["misc<br/>package group"]
  node_glffetch["GLFfetch<br/>[default.nix]"]
  node_pkg_theme["theme<br/>package group"]
  node_marble_shell["marble-shell-filled<br/>theme package<br/>[default.nix]"]
  node_pkg_tools["tools<br/>package group"]
  node_gsettings_diff["gsettings-diff<br/>tool<br/>[default.nix]"]
  node_kvm_archive["kvm-archive<br/>tool<br/>[default.nix]"]
  node_sshrm["sshrm<br/>tool<br/>[default.nix]"]
  node_fhs_shell["fhsEnv-shell<br/>tool<br/>[default.nix]"]
end

subgraph group_support["Shared support"]
  node_pkg_support[("buildSupport<br/>support layer")]
  node_rust_fenix["rust-fenix<br/>rust support"]
  node_lib["lib<br/>helpers<br/>[default.nix]"]
  node_modules["modules<br/>[default.nix]"]
  node_overlays["overlays<br/>overlay set<br/>[default.nix]"]
end

subgraph group_automation["Automation"]
  node_build_sh["build.sh<br/>build script<br/>[build.sh]"]
  node_makefile["Makefile<br/>automation"]
  node_github_ci["GitHub Actions<br/>ci pipeline<br/>[build.yml]"]
  node_dependabot["dependabot<br/>automation config<br/>[dependabot.yml]"]
  node_scripts[("script/<br/>maintenance scripts")]
end

node_flake -->|"exposes"| node_pkgs_index
node_flake -->|"publishes"| node_overlay
node_flake -->|"exports"| node_modules
node_flake -->|"uses"| node_lib
node_default -->|"imports"| node_pkgs_index
node_overlay -->|"assembles"| node_overlays
node_ci -->|"drives"| node_github_ci
node_pkgs_index -->|"contains"| node_pkg_editor
node_pkgs_index -->|"contains"| node_pkg_misc
node_pkgs_index -->|"contains"| node_pkg_theme
node_pkgs_index -->|"contains"| node_pkg_tools
node_pkgs_index -->|"depends on"| node_pkg_support
node_pkg_editor -->|"includes"| node_msedit
node_pkg_editor -->|"includes"| node_msedit_bin
node_pkg_misc -->|"includes"| node_glffetch
node_pkg_theme -->|"includes"| node_marble_shell
node_pkg_tools -->|"includes"| node_gsettings_diff
node_pkg_tools -->|"includes"| node_kvm_archive
node_pkg_tools -->|"includes"| node_sshrm
node_pkg_tools -->|"includes"| node_fhs_shell
node_pkg_support -->|"provides"| node_rust_fenix
node_rust_fenix -.->|"supports"| node_msedit
node_rust_fenix -.->|"supports"| node_msedit_bin
node_lib -->|"helps build"| node_pkgs_index
node_modules -.->|"configures"| node_pkg_tools
node_overlays -->|"re-exports"| node_pkgs_index
node_github_ci -->|"builds"| node_pkgs_index
node_github_ci -->|"evaluates"| node_ci
node_build_sh -.->|"builds"| node_pkgs_index
node_makefile -.->|"wraps"| node_build_sh
node_scripts -.->|"updates"| node_flake
node_dependabot -.->|"tracks"| node_flake

click node_flake "https://github.com/minegameytb/nurpkgs-repo/blob/master/flake.nix"
click node_default "https://github.com/minegameytb/nurpkgs-repo/blob/master/default.nix"
click node_overlay "https://github.com/minegameytb/nurpkgs-repo/blob/master/overlay.nix"
click node_ci "https://github.com/minegameytb/nurpkgs-repo/blob/master/ci.nix"
click node_pkgs_index "https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs"
click node_pkg_editor "https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/editor"
click node_msedit "https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/editor/msedit/default.nix"
click node_msedit_bin "https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/editor/msedit-bin/default.nix"
click node_pkg_misc "https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/misc"
click node_glffetch "https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/misc/GLFfetch/default.nix"
click node_pkg_theme "https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/theme"
click node_marble_shell "https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/theme/marble-shell-filled/default.nix"
click node_pkg_tools "https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/tools"
click node_gsettings_diff "https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/tools/gsettings-diff/default.nix"
click node_kvm_archive "https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/tools/kvm-archive/default.nix"
click node_sshrm "https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/tools/sshrm/default.nix"
click node_fhs_shell "https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/tools/fhsEnv-shell/default.nix"
click node_pkg_support "https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/buildSupport"
click node_rust_fenix "https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/buildSupport/rust-fenix/buildSupportNightly.nix"
click node_lib "https://github.com/minegameytb/nurpkgs-repo/blob/master/lib/default.nix"
click node_modules "https://github.com/minegameytb/nurpkgs-repo/blob/master/modules/default.nix"
click node_overlays "https://github.com/minegameytb/nurpkgs-repo/blob/master/overlays/default.nix"
click node_build_sh "https://github.com/minegameytb/nurpkgs-repo/blob/master/build.sh"
click node_makefile "https://github.com/minegameytb/nurpkgs-repo/tree/master/Makefile"
click node_github_ci "https://github.com/minegameytb/nurpkgs-repo/blob/master/.github/workflows/build.yml"
click node_dependabot "https://github.com/minegameytb/nurpkgs-repo/blob/master/.github/dependabot.yml"
click node_scripts "https://github.com/minegameytb/nurpkgs-repo/tree/master/script"

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_default,node_overlay,node_ci toneBlue
class node_pkgs_index,node_pkg_editor,node_msedit,node_msedit_bin,node_pkg_misc,node_glffetch,node_pkg_theme,node_marble_shell,node_pkg_tools,node_gsettings_diff,node_kvm_archive,node_sshrm,node_fhs_shell toneAmber
class node_pkg_support,node_rust_fenix,node_lib,node_modules,node_overlays toneMint
class node_build_sh,node_makefile,node_github_ci,node_dependabot,node_scripts toneRose
```

## Components

### Entry points

Primary Nix surfaces consumed by downstream users and CI.

- [flake.nix](https://github.com/minegameytb/nurpkgs-repo/blob/master/flake.nix): flake entrypoint · Main flake interface for inputs, outputs, and reproducible composition. · `flake.nix`
- [default.nix](https://github.com/minegameytb/nurpkgs-repo/blob/master/default.nix): repo entrypoint · Top-level Nix entry for importing the package collection. · `default.nix`
- [overlay.nix](https://github.com/minegameytb/nurpkgs-repo/blob/master/overlay.nix): overlay entrypoint · Downstream overlay surface for extending nixpkgs with repo packages. · `overlay.nix`
- [ci.nix](https://github.com/minegameytb/nurpkgs-repo/blob/master/ci.nix): CI entrypoint · Nix-side CI definition for build validation and release plumbing. · `ci.nix`

### Packages

Reusable package definitions and leaf derivations.

- [pkgs/](https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs): package set · Root package collection organized into independently buildable derivations. · `pkgs`
- [editor](https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/editor): package group · Editor-related packages and binaries. · `pkgs/editor`
- [msedit](https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/editor/msedit/default.nix): package · Editor package definition. · `pkgs/editor/msedit/default.nix`
- [msedit-bin](https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/editor/msedit-bin/default.nix): package · Binary distribution wrapper for the editor. · `pkgs/editor/msedit-bin/default.nix`
- [misc](https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/misc): package group · Auxiliary utility packages. · `pkgs/misc`
- [GLFfetch](https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/misc/GLFfetch/default.nix): package · Miscellaneous utility package definition. · `pkgs/misc/GLFfetch/default.nix`
- [theme](https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/theme): package group · Theming assets and shell customization packages. · `pkgs/theme`
- [marble-shell-filled](https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/theme/marble-shell-filled/default.nix): theme package · Theme or shell customization package. · `pkgs/theme/marble-shell-filled/default.nix`
- [tools](https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/tools): package group · Standalone tools and scripts packaged for reuse. · `pkgs/tools`
- [gsettings-diff](https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/tools/gsettings-diff/default.nix): tool · Diff tool for settings/configuration state. · `pkgs/tools/gsettings-diff/default.nix`
- [kvm-archive](https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/tools/kvm-archive/default.nix): tool · Tooling for KVM archive workflows. · `pkgs/tools/kvm-archive/default.nix`
- [sshrm](https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/tools/sshrm/default.nix): tool · SSH-related utility package. · `pkgs/tools/sshrm/default.nix`
- [fhsEnv-shell](https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/tools/fhsEnv-shell/default.nix): tool · FHS shell environment package. · `pkgs/tools/fhsEnv-shell/default.nix`

### Shared support

Common helpers and build infrastructure.

- [buildSupport](https://github.com/minegameytb/nurpkgs-repo/tree/master/pkgs/buildSupport): support layer · Shared build infrastructure for package definitions. · `pkgs/buildSupport`
- [rust-fenix](https://github.com/minegameytb/nurpkgs-repo/blob/master/pkgs/buildSupport/rust-fenix/buildSupportNightly.nix): rust support · Shared Rust toolchain and build-input selection layer, likely centered on nightly support. · `pkgs/buildSupport/rust-fenix/buildSupportNightly.nix`
- [lib](https://github.com/minegameytb/nurpkgs-repo/blob/master/lib/default.nix): helpers · Internal helper functions and package-construction utilities. · `lib/default.nix`
- [modules](https://github.com/minegameytb/nurpkgs-repo/blob/master/modules/default.nix): Nix modules · NixOS or Home Manager integration modules. · `modules/default.nix`
- [overlays](https://github.com/minegameytb/nurpkgs-repo/blob/master/overlays/default.nix): overlay set · Overlay collection consumed by downstream Nix configurations. · `overlays/default.nix`

### Automation

CI and repo maintenance tooling.

- [build.sh](https://github.com/minegameytb/nurpkgs-repo/blob/master/build.sh): build script · Repository build/validation helper script. · `build.sh`
- [Makefile](https://github.com/minegameytb/nurpkgs-repo/tree/master/Makefile): automation · Convenience entry for local maintenance tasks. · `Makefile`
- [GitHub Actions](https://github.com/minegameytb/nurpkgs-repo/blob/master/.github/workflows/build.yml): ci pipeline · Workflow-based build automation and publication gating. · `.github/workflows/build.yml`
- [dependabot](https://github.com/minegameytb/nurpkgs-repo/blob/master/.github/dependabot.yml): automation config · Dependency update automation for flake and tooling inputs. · `.github/dependabot.yml`
- [script/](https://github.com/minegameytb/nurpkgs-repo/tree/master/script): maintenance scripts · Repo maintenance scripts for syntax fixing and flake updates. · `script`

## Connections

- flake.nix → pkgs/: exposes · Flake exports the package collection and related outputs.
- flake.nix → overlay.nix: publishes · Flake wires overlay outputs for consumers.
- flake.nix → modules: exports · Flake can expose NixOS/Home Manager modules.
- flake.nix → lib: uses · Flake composition relies on shared helper functions.
- default.nix → pkgs/: imports · Top-level import into the package set.
- overlay.nix → overlays: assembles · Overlay entrypoint is backed by the overlay collection.
- ci.nix → GitHub Actions: drives · Nix CI definition is executed by the GitHub workflow.
- pkgs/ → editor: contains · Package collection is split into domain-focused groups.
- pkgs/ → misc: contains · Package collection is split into domain-focused groups.
- pkgs/ → theme: contains · Package collection is split into domain-focused groups.
- pkgs/ → tools: contains · Package collection is split into domain-focused groups.
- pkgs/ → buildSupport: depends on · Packages share build infrastructure from the support layer.
- editor → msedit: includes · Editor group contains the main editor package.
- editor → msedit-bin: includes · Editor group contains the binary wrapper package.
- misc → GLFfetch: includes · Misc group contains utility packages.
- theme → marble-shell-filled: includes · Theme group contains theming assets/packages.
- tools → gsettings-diff: includes · Tools group contains standalone utilities.
- tools → kvm-archive: includes · Tools group contains standalone utilities.
- tools → sshrm: includes · Tools group contains standalone utilities.
- tools → fhsEnv-shell: includes · Tools group contains standalone utilities.
- buildSupport → rust-fenix: provides · Shared Rust toolchain support is centralized here.
- rust-fenix → msedit: supports · Rust support layer likely feeds Rust-based package builds.
- rust-fenix → msedit-bin: supports · Rust support layer likely feeds Rust-based package builds.
- lib → pkgs/: helps build · Library helpers reduce duplication across package definitions.
- modules → tools: configures · Modules likely provide system/user configuration around packaged tools.
- overlays → pkgs/: re-exports · Overlay layer makes repo packages available downstream.
- GitHub Actions → pkgs/: builds · Workflow validates the package set.
- GitHub Actions → ci.nix: evaluates · Workflow runs the CI definition.
- build.sh → pkgs/: builds · Local build script supports derivation builds.
- Makefile → build.sh: wraps · Makefile likely fronts common maintenance commands.
- script/ → flake.nix: updates · Maintenance scripts manage flake syntax and input updates.
- dependabot → flake.nix: tracks · Automation keeps flake inputs current.
