# NexusOS Targets

## Overview
This document outlines the objectives and technical requirements for NexusOS, a modular and reproducible Linux distribution.

## Objectives
- **Modularity**: Adaptability to various use cases (Core, App, Desktop, systemd).
- **Reproducibility**: Deterministic builds with verifiable hashes.
- **Flexibility**: Optional GNU-free configuration for special use cases (e.g., military or security-critical environments).

## Runtime Profiles (Examples & Possibilities)
NexusOS employs context-dependent runtime profiles for `libc` and memory allocators, declaratively managed via `.npk` files:

| Layer            | libc    | Allocator         | Use Case                                |
|------------------|---------|-------------------|-----------------------------------------|
| 🧱 Core/Base      | musl    | internal malloc   | Init, Shell, Recovery                   |
| 🧰 App Layer      | musl    | jemalloc/tcmalloc | CLI/Server Apps, Multi-threaded Tools   |
| 🖥️ Desktop Layer  | glibc   | glibc malloc      | KDE, GTK, Wayland, Graphical Programs   |
| ⚙ systemd Layer   | glibc   | jemalloc (optional) | systemd, journald, logind               |

### Optional: GNU-Free Profiles (Phase 2)
- **libc**: `musl` (GNU-free).
- **Allocator**: `tcmalloc` (performance-focused, GNU-free).
- **Tools**: `toybox` instead of GNU coreutils.
- **Goal**: Deterministic, minimalistic builds for security-critical applications.

## Technical Requirements
- Minimal kernel with KSPP hardening.
- ISO creation using `archiso` or `mkinitcpio`.
- `nip` tool for package management and verification.

## Next Steps
- Prototype ISO with `archlinux-musl` and `toybox`.
- Development of `nip` for runtime profile management.
