Nucleus
Extremely lightweight, security-hardened, declarative container runtime for agents and production services
Nucleus is a minimalist container runtime for Linux. It provides isolated execution environments using Linux kernel primitives without the overhead of traditional container runtimes. For production services, it is designed around a fully declarative model: Nix builds the root filesystem, the NixOS module declares the service, and Nucleus mounts a pinned, reproducible closure at runtime.
Nucleus supports three operating modes:
Agent mode (default) – ephemeral, fast-startup sandboxes for AI agent workloads
(default) – ephemeral, fast-startup sandboxes for AI agent workloads Strict agent mode – fail-closed isolation for ephemeral agent workloads without requiring production rootfs, health checks, sd_notify, or NixOS service semantics
– fail-closed isolation for ephemeral agent workloads without requiring production rootfs, health checks, sd_notify, or NixOS service semantics Production mode – strict isolation for long-running, network-bound NixOS services with declarative configuration, reproducible Nix-built root filesystems, egress policy enforcement, health checks, and systemd integration
Production deployments are built to be:
Fully declarative – service topology, runtime settings, and mounted rootfs are defined up front instead of assembled imperatively at deploy time
– service topology, runtime settings, and mounted rootfs are defined up front instead of assembled imperatively at deploy time Nix-native – first-class NixOS module support plus nucleus.lib.mkRootfs for minimal service closures
... continue reading