Review fixes (8 blocking issues):
- Extract ParseError to shared error.hpp (ODR fix)
- Remove dead package.cpp/package.hpp + tomlplusplus dep
- Safe parse_int() helper replacing crash-prone std::stoi
- consume_string() now accepts bare numbers and idents
- line_at() fixed for post-EOF line numbers
- Subcommand validation before file read in CLI
- KwService/KwAssert/KwImport added to consume_ident()
- root partition promoted to first-class BootBlock field
New features:
- Imports: imports = [...] with recursive merge resolution
- Assertions: assert { "msg" : field op value } in both parsers
- Merge engine: resolve_package() with features/config merge + force support
- Per-package overrides: /kappa/system/builds/<name>.kap
- .gitignore: added vcpkg_installed/ and kappa binary
96 lines
1.5 KiB
Plaintext
96 lines
1.5 KiB
Plaintext
/*
|
|
* Kappa system configuration.
|
|
* Lives at /kappa/system/config.kap
|
|
*/
|
|
|
|
imports = []
|
|
|
|
assert {
|
|
"efi partition required for UEFI boot" : boot.efi != ""
|
|
"root partition must be set" : boot.root != ""
|
|
}
|
|
|
|
system {
|
|
hostname = "kappa.local"
|
|
timezone = "America/New_York"
|
|
|
|
features {
|
|
ssl = true
|
|
wayland = false
|
|
pulseaudio = false
|
|
}
|
|
|
|
env {
|
|
CFLAGS = "-O2 -march=native"
|
|
LDFLAGS = "-Wl,--as-needed"
|
|
MAKEFLAGS = "-j8"
|
|
}
|
|
|
|
config {
|
|
prefix = "/usr"
|
|
log_dir = "/var/log"
|
|
}
|
|
|
|
rollback {
|
|
keep = 5
|
|
}
|
|
}
|
|
|
|
packages {
|
|
foo {
|
|
version = ">=1.2"
|
|
features {
|
|
gui = true
|
|
}
|
|
config {
|
|
port = "9090"
|
|
ssl = true
|
|
}
|
|
}
|
|
bar {}
|
|
baz {
|
|
features {
|
|
ssl = false
|
|
}
|
|
}
|
|
|
|
/*
|
|
// Per-package overrides can also live in
|
|
// /kappa/system/builds/<name>.kap
|
|
*/
|
|
}
|
|
|
|
services {
|
|
nginx {
|
|
enable = true
|
|
port = 80
|
|
ssl = true
|
|
}
|
|
sshd {
|
|
enable = true
|
|
port = 22
|
|
}
|
|
cron {
|
|
enable = false
|
|
}
|
|
}
|
|
|
|
boot {
|
|
kernel = "linux"
|
|
init = "s6"
|
|
efi = "/dev/sda2"
|
|
swap = "/dev/sda3"
|
|
bootloader = "limine"
|
|
root = "/dev/sda1"
|
|
}
|
|
|
|
users {
|
|
specter {
|
|
shell = "/bin/zsh"
|
|
groups = ["wheel", "audio", "docker"]
|
|
}
|
|
root {
|
|
shell = "/bin/zsh"
|
|
}
|
|
}
|