refactor: implement component-based architecture for enhanced maintainability
- Reorganize directory structure into core/, features/, and themes/ - Colocate application Nix logic, configs, scripts, and theme overrides - Implement 'Inversion of Control' for theming: apps now pull theme-specific layouts - Update flake.nix and shared library paths to match the new structure - Document the new Feature-Centric architecture in README.md
This commit is contained in:
@@ -7,7 +7,7 @@ Users interact with the system by importing the distro's modules into their own
|
||||
|
||||
## Directory Structure
|
||||
* `flake.nix` (Master entry point with core modules and test configurations)
|
||||
* `installer/install-nomarchy.sh` (Interactive installer generating a clean downstream flake)
|
||||
* `installer/install.sh` (Interactive installer generating a clean downstream flake)
|
||||
* `modules/system/default.nix` (Distro-wide OS defaults: SDDM, Plymouth, Audio, Network)
|
||||
* `modules/home/default.nix` (Distro-wide user environment: Hyprland, Waybar, Styling)
|
||||
* `bin/` (The collection of Omarchy productivity and config scripts)
|
||||
@@ -20,7 +20,7 @@ Users interact with the system by importing the distro's modules into their own
|
||||
* **Downstream:** The user's `/etc/nixos/flake.nix` imports the upstream modules. The user's personal customizations are kept in `/etc/nixos/system.nix` and `/etc/nixos/home.nix`.
|
||||
* **Merging:** NixOS automatically merges definitions. For example, if both the distro and the user add packages to `home.packages`, the final system includes the union of both lists.
|
||||
|
||||
### 2. The Interactive Installer (`installer/install-nomarchy.sh`)
|
||||
### 2. The Interactive Installer (`installer/install.sh`)
|
||||
The installer is designed to bootstrap a fresh system with this modular structure:
|
||||
1. **Repo Detection:** Identifies the location of the Nomarchy source.
|
||||
2. **Scaffolding:** Creates a new downstream `flake.nix` that imports Nomarchy core modules.
|
||||
@@ -35,6 +35,6 @@ The installer is designed to bootstrap a fresh system with this modular structur
|
||||
* **Palettes:** Themes are defined in simple `colors.toml` files. The distro dynamically generates Base16 palettes from these, allowing for infinite theme expansion without modifying Nix code.
|
||||
|
||||
## Verification & Build
|
||||
* **Test Installer:** `./bin/nomarchy-test-installer` (Builds a VM of the installer environment).
|
||||
* **Test Installer:** `./bin/utils/nomarchy-test-installer` (Builds a VM of the installer environment).
|
||||
* **Check Integrity:** `nix flake check --impure` (Verifies all configurations evaluate).
|
||||
* **Build ISO:** `nix build .#nixosConfigurations.installerIso.config.system.build.isoImage` (Generates the flashable USB image).
|
||||
|
||||
Reference in New Issue
Block a user