feat: system config DSL, services, CLI with rustc diagnostics

- System config parser (system/packages/services/boot/users blocks)
- Boot block: kernel, init, efi, swap, bootloader, root partition
- System-wide features, rollback config, swap partition
- Service block: per-init variants (runit, s6, etc.), system init selection via boot.init
- Feature-gated dependencies, config values accept numbers/bools/strings
- CLI: parse-package, parse-config, validate subcommands
- Rustc-style error diagnostics with source context, carets, help text
- Diagnostic module with ANSI color output
This commit is contained in:
2026-07-29 22:50:39 -04:00
parent a8b53681fc
commit d5f7d397ed
12 changed files with 850 additions and 19 deletions
+2
View File
@@ -19,6 +19,7 @@ static const std::unordered_map<std::string_view, TokenType> keywords = {
{"license", TokenType::KwLicense},
{"patches", TokenType::KwPatches},
{"env", TokenType::KwEnv},
{"service", TokenType::KwService},
{"prepare", TokenType::KwPrepare},
{"build", TokenType::KwBuild},
{"check", TokenType::KwCheck},
@@ -51,6 +52,7 @@ std::string_view token_name(TokenType type) {
case TokenType::KwLicense: return "license";
case TokenType::KwPatches: return "patches";
case TokenType::KwEnv: return "env";
case TokenType::KwService: return "service";
case TokenType::KwPrepare: return "prepare";
case TokenType::KwBuild: return "build";
case TokenType::KwCheck: return "check";