nx_media_env.nx
buildroot/runtime/nx_media_env.nx
about
nx_media_env.nx -- SOVEREIGN, PORTABLE launch config for the media/torrent daemon.
The per-spoke storage layout is DATA-DRIVEN (CLAUDE.md #11/#17): it lives in a profile TABLE here, NOT
hardcoded in the daemon and NOT in a .tsv. Porting the daemon to a new spoke (the NAS hub, another box)
= ADD A PROFILE ROW -- nothing in the daemon changes. The profile is chosen by name (argv[1], default
"dev"); this launcher ensures the area dirs exist, DEPLOYS the bundle's worker elfs into /tmp (the
daemon's launch contract: it execs /tmp/nx_*.sov.elf), then execs the daemon with the profile's roots.
The SAME bundle therefore runs on the dev laptop and the NAS hub by configuration alone.
Used by: the NAS nx_hostctl spawn cmd -> `nx_media_env hub`; the dev box can use `nx_media_env dev`.
license_tier: ORIGINAL layer: L7 (portable launch config over the L6 daemon)
module: nishi-core.media.env
depends: nishi-core.syscalls
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 15 | const K_MAGIC_262144: i64 = 262144 |
| 16 | const K_MAGIC_1024: i64 = 1024 |
| 17 | const K_MAGIC_8097: i64 = 8097 |
functions
| 19 | func me_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 } |
| 20 | func me_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 23 | func me_join(dir: *u8, name: *u8, out: *u8) -> *u8 |
| 33 | func me_copy(src: *u8, dst: *u8) -> i64 |
| 44 | func me_deploy_bundle(bundle_dir: *u8) -> i64 |
| 68 | func me_launch(sfw: *u8, nsfw: *u8, index: *u8, bundle: *u8, bind_mode: *u8) -> i64 |
| 83 | func main(argc: i64, argv: *i64) -> i64 |