Building your own

Packaging software for your machine, a repository to serve it from, systems of your own, and owning the stack from the source up.

Not ready yet

The tools Nerv builds itself with ship in nerv-dev, and the repository server is ready to use. Building your own packages and systems with them is still shaped around Nerv's own build machines, and this chapter is written out in full once it is not. What follows is the shape of it.

$ doas dnf install nerv-dev

Packaging a program

A package of your own is an RPM spec, built the way Nerv builds its own: geofront composes a clean musl build root with dnf, runs rpmbuild inside it, and publishes the result. It runs as you, without root: the build root is a directory of yours, and inside it you are root of a namespace of your own, whose other accounts come from your range in /etc/subuid and /etc/subgid. Every account Nerv creates has one; an account without one is refused with the usermod line that gives it one.

$ geofront build --no-publish packages/myprogram/myprogram.spec

Every build leaves a typed record in the journal, at its start and at its end: the commit and spec it was built from, what its build root was made of, how long each step took, and how it ended. journalctl GEOFRONT_EVENT=build-finished GEOFRONT_OUTCOME=failed lists the builds that failed, with the step each one stopped in. GEOFRONT_EVENTS=off turns the records off.

nerv-rpm-config gives every build Nerv's hardened compiler flags and the .nerv release tag, and nerv-musl-clang is the compiler and linker for musl, which a Rust package names as its linker. Setting up the build root outside Nerv's own build machines is the part still in progress.

A repository of your own

nerv-repo serves packages and systems to your machines, signed, from a host you run:

$ doas nerv-repo setup

sets a host up, with nginx in front of it. Builders push to it with nerv-repo push, the host signs and indexes what it accepts, nerv-repo candidates and nerv-repo promote move packages from testing to stable, and nerv-repo mirror copies the signed result, byte for byte, to mirrors. A machine pointed at your host installs from it as it does from Nerv's.

Systems of your own

$ nerv-install generation --id my-2026-11 --out ./gen --profile workstation

composes a generation, a whole system ready to install or update to, from Nerv's repository or yours, and nerv-repo publish-image signs and publishes it. Composing systems is moving off individual machines: a machine receives its system and never composes it, and this section changes with that.

Owning the stack

Nerv is open source under Apache-2.0, every package of it built from source with the tools above. Its source is on Codeberg, codeberg.org/nerv-dynamics/nerv-linux, with contributions under the Developer Certificate of Origin and no contributor agreement to sign.