How minegameytb/glf-os works
Main Components
• Build System & Tooling:
• Nix flake (flake.nix and flake.lock): This is the core of the build process.
• Justfile: A task runner that wraps multiple operations (ISO building, install, cleaning, checking, and VM testing).
• GitHub workflows in .github/workflows: These automate builds (e.g., nix-build) and pages deployment.
• Configuration Layers:
• Standard NixOS modules (modules/default): Contains individual configuration elements (firefox, nvidia, gaming, etc.) using a modular, declarative approach.
• ISO Specific configuration (iso-cfg): Holds configuration files and custom configurations specific to the ISO build.
• Patches (patches/calamares-nixos-extensions): Contains extensions or modifications to the installer components.
• Custom Packages (pkgs): For example, GLFfetch is specified here.
• Documentation & Assets:
• docs directory: Contains documentation pages (in Markdown) and configuration for the static site (using Jekyll or similar) including custom styles and images.
• assets: Contains media files such as wallpapers.
• Testing & Validation:
• Just commands (just check, just build, just build-vm): These interact with the configuration to perform syntax checking, configuration build caching, and VM-based testing of the ISO.
Relationships and Interactions
• The Nix flake serves as the unified entry point to the configuration by aggregating modules, patches, and ISO specific configurations.
• The Justfile orchestrates sequential operations:
• It triggers the ISO build (via nix build .#iso) and installation (which copies the generated ISO and creates a hash file).
• It launches testing (syntax checks and building configurations without generating an ISO) and VM testing.
• GitHub workflows further extend this by automating flavor-specific builds (nix builds, pages updates, etc.) and ensuring the repository’s continuous integration and delivery.
• The modules layer interacts with both the ISO configuration and the patches to customize the NixOS system installation.
• Documentation (docs, assets) and versioning (LICENSE, README) support user and developer guidance.
Architectural Patterns and Technologies
• Declarative Configuration Pattern: NixOS configurations are highly modular and declarative. Components are expressed in Nix language files (default.nix, system.nix, etc.) that are composed to generate the final system configuration.
• Flake-based Build: Centralized build control via the flake.nix, facilitating reproducible builds.
• Task Orchestration & Automation: Use of a Justfile to define a set of repeatable operations (build, install, clean, check, etc.).
• Continuous Integration / Continuous Deployment: GitHub workflows automate tests and builds, ensuring that changes to modules or configurations build correctly.
• Customization via Patches: The patches directory shows an architecture that supports customizing external components (i.e., Calamares installer modifications).