How minegameytb/nixos-configuration works
1. This is a Nix flake–based NixOS configuration repository. The top-level flake.nix and flake.lock define the pinned package set and are the central composition point for all system, user, and package outputs.
2. The repo is split by responsibility, not by application: configurations/ holds NixOS system configuration, home-manager/ holds user-session configuration, pkgs/ contains local package definitions, and profiles/ contains host-specific bundles that combine the right pieces for a given machine.
3. The NixOS layer is organized as a hierarchy of modules. configurations/configuration.nix appears to be the root system entry, with reusable “common” modules under configurations/configs/common, role-specific modules under configurations/configs/specific, and cross-cutting services under configurations/configs/system.
4. Hardware and disk layout are intentionally separated from the main system policy. configurations/hardware-configuration/ contains per-machine hardware files, while configurations/disko-configuration/ contains declarative disk layouts for installation and formatting. This means machine provisioning is a first-class part of the architecture, not an afterthought.
5. Boot and storage are modularized around multiple platform paths. Under configurations/configs/bootloader/ there are distinct branches for GRUB2, systemd-boot, EFI mountpoint handling, and BIOS/EFI variants, which suggests the final host profile chooses one boot path depending on firmware and disk format.
6. The repo distinguishes “base system policy” from “feature bundles.” Common system settings include users, timezone, security, shell, fonts, Nix settings, and system apps. Specific bundles then add desktop, laptop, container, or VM behavior without duplicating the base layer.
7. Desktop configuration is its own subsystem. configurations/configs/specific/desktop/ covers GNOME, X11, sound, printer support, Plymouth, autologin, and browser choices. It also includes a large games subtree for Steam, Lutris, Heroic, PrismLauncher, emulators, Waydroid, and Flatpak-based game installs.
8. Virtualization is modeled symmetrically on both sides: configurations/configs/specific/vm/host configures host-side hypervisor features such as QEMU/KVM and VMware Workstation, while configurations/configs/specific/vm/guest configures guest integration such as SSH, Tailscale, Nextcloud, and QEMU guest support.
9. home-manager/ is the user-space counterpart to the NixOS modules. It has common CLI/editor settings, customization modules for apps and themes, desktop GUI package sets, and separate “standalone” versus “NixOS-integrated” paths. This indicates user environment configuration is reusable both inside and outside the NixOS system build.
10. The repo uses custom module extensions and overlays to bend upstream packages to its needs. configurations/modules/ and home-manager/config-modules/ add feature modules such as declarative Flatpak, nix-index-db, lazyvim, and browser hardening; configurations/configs/overlays/ and top-level overlay.nix adjust upstream packages like coreutils, GNOME components, AppImage support, and browser-related packages.
11. Local package development lives under pkgs/, with explicit derivations such as sshrm, rm-only, and an FHS development environment. This is a separate boundary from system configuration: these packages can be injected into NixOS or Home Manager without changing the system module structure.
12. Host selection is captured in profiles/ and hm-profiles/. These files likely assemble a complete machine identity by combining a hardware target, a boot mode, a GUI/no-GUI choice, and a user profile. The README’s examples for hp-probook, hp-240, and VM profiles confirm that profile composition is the main way to produce concrete hosts.
13. There are some repo-specific operational helpers. script/update-flake automates lockfile updates and commits, script/mksymlink creates symlinks into a home directory, and build.sh/Makefile likely wrap common Nix commands for development and deployment. These scripts support repo maintenance rather than being part of the runtime system.
14. Installation and provisioning flow through Disko and NixOS install. The README shows disk creation/mounting via disko, then host build installation via nixos-install --flake. So the architecture includes both declarative OS composition and declarative disk provisioning as separate but coordinated stages.
Main entry points: configuration.nix System root · flake.nix Flake · home.nix Home root · profiles Profiles
Components 26
Flake & entrypoints
Top-level composition and repo orchestration.
NixOS system
System configuration, hardware, storage, boot, services, and overlays.
- System root · Main NixOS configuration entrypoint.
configurations/configuration.nix - Common opts · Shared base policy such as users, time, shell, fonts, Nix, and packages.
configurations/configs/common/system-opts - Security · Common security-related NixOS settings.
configurations/configs/common/security.nix - Networking · Shared network configuration layer.
configurations/configs/networking/default.nix - System services · Cross-cutting services and runtime behavior.
configurations/configs/system/services - Bootloader · Boot path selection across EFI, BIOS, GRUB, and systemd-boot.
configurations/configs/bootloader - Hardware · Per-machine hardware definitions and firmware-specific facts.
configurations/hardware-configuration - Disk layout · Declarative disk partitioning and formatting layouts.
configurations/disko-configuration - Overlays · Nixpkgs overlays and package adjustments used by the system.
configurations/configs/overlays - Modules · Additional NixOS modules extending upstream behavior.
configurations/modules - Specific bundles · Role-specific additions for desktop, laptop, container, and VM machines.
configurations/configs/specific - Desktop · GUI-focused configuration including GNOME, X11, sound, printers, and games.
configurations/configs/specific/desktop - VM host · Host-side virtualization features for QEMU/KVM and VMware.
configurations/configs/specific/vm/host - VM guest · Guest integration such as SSH, Tailscale, Nextcloud, and QEMU guest support.
configurations/configs/specific/vm/guest
Home Manager
User-session configuration for standalone and NixOS-integrated use.
- Home root · Primary Home Manager entrypoint.
home-manager/home.nix - Home common · Shared CLI, editor, and user configuration defaults.
home-manager/configs/common - Customization · App, CLI, and theme customization modules.
home-manager/configs/customization - Desktop apps · GUI package sets for desktop user environments.
home-manager/configs/desktop/gui-packages.nix - Standalone HM · Home Manager configuration path usable outside NixOS.
home-manager/configs/specific/standalone - NixOS HM · Home Manager configuration path for NixOS-integrated use.
home-manager/configs/specific/nixos
Profiles
Host and machine composition layers.
- Profiles · Concrete machine profiles combining hardware, boot mode, and feature bundles.
profiles - HM profiles · User-profile assembly for desktop, server, and VM variants.
hm-profiles
Local packages
Repository-local derivations and helper packages.
- Local pkgs · Repository-local derivations injected into the system or user environment.
pkgs
Ops & scripts
Maintenance and convenience tooling.
- Scripts · Repository maintenance and convenience scripts.
script
Connections 38
- Flake → Lockfile: pins · The flake resolves inputs through the lockfile.
- Flake → System root: exports · System outputs are composed from the top-level flake.
- Flake → Home root: exports · Home Manager outputs are composed from the top-level flake.
- Flake → Profiles: assembles · Machine profiles are built as flake outputs.
- Flake → HM profiles: assembles · User profiles are built as flake outputs.
- Flake → Local pkgs: packages · Local package derivations are exposed through the flake.
- Flake → Overlays: applies · Package overrides feed into the flake's package set.
- Profiles → Hardware: selects · Profiles choose the target hardware definition.
- Profiles → Disk layout: selects · Profiles choose a declarative storage layout.
- Profiles → Bootloader: selects · Profiles choose the appropriate boot path.
- Profiles → Specific bundles: combines · Profiles compose feature bundles into a host.
- Specific bundles → Desktop: includes · Desktop hosts get GUI and games features.
- Specific bundles → VM host: includes · Host virtualization bundles are available for VM-capable machines.
- Specific bundles → VM guest: includes · Guest integration bundles are available for guest images.
- System root → Common opts: imports · The system root pulls in the shared baseline modules.
- System root → Security: imports · Security policy is part of the system baseline.
- System root → Networking: imports · Network configuration is part of the system baseline.
- System root → System services: imports · Cross-cutting services are wired into the system root.
- System root → Bootloader: imports · Boot modules are composed into the system root.
- System root → Hardware: imports · Hardware facts are consumed by the system configuration.
- System root → Disk layout: imports · Disk provisioning is paired with the system configuration.
- System root → Modules: extends · Custom NixOS modules extend the system root.
- System root → Overlays: uses · System configuration consumes local package overlays.
- System root → Local pkgs: uses · Local derivations are made available to the system.
- Desktop → Modules: uses · Desktop features rely on custom modules where needed.
- Desktop → Overlays: uses · Desktop-specific package tweaks come from overlays.
- VM host → Modules: uses · Virtualization host features may depend on custom modules.
- VM guest → Modules: uses · Guest integration may depend on custom modules.
- Home root → Home common: imports · The user environment starts from common Home Manager modules.
- Home root → Customization: imports · Custom app and theme modules are included in Home Manager.
- Home root → Desktop apps: imports · Desktop user packages are added when relevant.
- Home root → Standalone HM: selects · Standalone Home Manager is one supported mode.
- Home root → NixOS HM: selects · NixOS-integrated Home Manager is the other supported mode.
- Standalone HM → HM profiles: matches · Standalone Home Manager uses profile-style composition.
- NixOS HM → Profiles: matches · Integrated Home Manager is aligned with host profiles.
- Customization → Modules: extends · User-side custom modules mirror system-side extensions.
- Home root → Local pkgs: uses · User environments can consume repository-local packages.
- Scripts → Flake: maintains · Helper scripts support flake and repository maintenance.