Nucleus – A security-hardened, Nix-native container runtime

Hi HN, I've been building Nucleus, a lightweight Linux container runtime focused on two workloads: ephemeral AI-agent sandboxes and declarative NixOS services. It's a single Rust binary, no daemon.It is not a Docker replacement and not a strict subset of Docker either. I dropped the entire image-and-distribution half (no Dockerfile, no layers, no registry, no pull/push, no persistent storage layer) in exchange for going deeper on isolation and reproducibility. The rootfs is either a directory copied into tmpfs (agent mode) or a Nix-built closure mounted read-only (production mode). If your mental model is "run my image instead of docker run," this won't fit. If it's "run untrusted or ephemeral workloads with stronger, auditable isolation on a single host," that's the target.Things that I think are interesting: - Defense-in-depth defaults. All capabilities dropped, ~100-syscall seccomp allowlist (vs Docker's ~300), up to 8 namespaces including time/cgroup, Landlock LSM path ACLs per service. - Deny-by-default egress. Outbound traffic is denied unless you allow specific CIDRs or DNS-resolved domains. Enforced with namespace-local iptables rules. - Externalized, hash-pinned security policies. seccomp (JSON), capabilities (TOML), and Landlock (TOML) live as separate SHA-256-verified files, decoupled from the rootfs build. There's a nucleus seccomp generate that records syscalls in trace mode and emits a minimal profile. - gVisor as a first-class integrated runtime, not an add-on. Explicit network modes including a gvisor-host mode that's intentionally separate from native host networking. - Nix-native production path. nucleus.lib.mkRootfs builds locked-down closures; rootfs attestation verifies a per-file SHA-256 manifest at startup; first-class NixOS module. - Formal verification. TLA+ specs for the isolation/resource/filesystem/security/gVisor subsystems, checked with

Hacker NewsToolAISource
0Sign in to voteCopy link

FL score

62

out of 100

Verdict

VALIDATE

medium confidence

Competition

No competitor data yet

Trend

No signal yet

A specialized container runtime for running untrusted AI agents and NixOS services with stronger isolation than Docker, but only solves a narrow slice of the containerization market.

The pain

Running untrusted code (AI agents, third-party plugins) in production requires isolation stronger than Docker provides. Current options are either Docker + gVisor (complex, not integrated) or building custom sandboxes (expensive, error-prone). Teams running NixOS want declarative, reproducible container deployments without Docker's image/registry overhead.

The gap

No tool exists that combines: (1) defense-in-depth defaults with formal verification, (2) deny-by-default networking, (3) native Nix integration, and (4) gVisor as a first-class runtime. Docker is too permissive by default; gVisor alone requires orchestration; Nix tooling lacks container-specific hardening.

Build angle

Start by validating demand in two specific segments: (1) AI/LLM companies running agent sandboxes (Claude plugins, autonomous agents), and (2) NixOS-native infrastructure teams (Determinate Systems customers, NixOS Foundation members). Build a minimal MVP that handles one workload (agent sandboxing) with 3-5 security policies, then expand. Charge per-deployment or per-agent-execution, not per-seat.

Strengths

  • Solves a real, specific problem (untrusted code isolation) that Docker doesn't address well
  • Technical depth is genuine: formal verification, syscall allowlisting, Landlock LSM integration show serious security engineering
  • Nix integration is a genuine moat, no competitor has this depth
  • Single binary, no daemon = low operational friction for the target use case
  • Deny-by-default networking is a meaningful security improvement over Docker's defaults
  • Externalized, hash-pinned policies enable auditability that regulated industries need

Risks

  • Market size is small: AI agent sandboxing is real but nascent; NixOS adoption is <5% of Linux users
  • Requires users to understand Nix, seccomp, Landlock, and gVisor, high barrier to adoption outside specialist communities
  • No clear monetization path: open-source tool with no SaaS layer, no obvious enterprise upsell
  • Formal verification is impressive but doesn't reduce time-to-market or user acquisition
  • Docker/Kubernetes ecosystem is entrenched; even specialized tools struggle to gain traction without orchestration integration
  • Competitor risk: Docker could add deny-by-default networking and gVisor integration in 6 months
  • Validation risk: AI agent sandboxing demand may be driven by hype, not actual production workloads
  • Nix-native positioning limits addressable market to Nix users; unclear if that's 10K or 100K globally

Questions about this idea?

FlyBot reads the scoring and gives you a second opinion on “Nucleus – A security-hardened, Nix-native container runtime”.

Open FlyBot