Files
devvm/tests
w3cjandClaude Opus 5.5 b70742eaf9 feat(images): the nix layer on --from Debian and Alpine
Debian (systemd) needed nothing new: the node:24 (Debian 12) VM's nix layer
installs, runs nix run nixpkgs#hello and builds in Nix's sandbox. Alpine
(OpenRC, musl) is supported: Nix's tarball binaries are static or linked
against its store's glibc, so they run on musl, and its daemon becomes an
OpenRC service of devvm's.

- nix.sh: on Alpine, apk add xz (GNU tar needs it for the tarball; shadow's
  groupadd and useradd are base's), unpinned and said so, as the docker
  layer's Alpine packages are; on OpenRC, /etc/init.d/nix-daemon
  (openrc-run, command_background, its pid in /run/nix-daemon.pid, its log
  in /var/log/nix-daemon.log), added to the default runlevel and started.
  OpenRC reads /etc/conf.d/nix-daemon for it, the file guest/sync.sh writes
  with the VM's proxy under network policy.
- sync.sh: on OpenRC, a changed /etc/conf.d/nix-daemon restarts the service
  with rc-service.
- e2e from: the node:24 VM is node+python+docker+nix+claude (nix-daemon's
  socket active, hello, a sandboxed build); the alpine:3 VM is
  node+docker+nix (the service running, hello, a sandboxed build, no crashed
  services, then devvm network on and restart: /etc/conf.d/nix-daemon has
  the proxy and a fixed-output fetch from a host that isn't allowed gets the
  proxy's 403).
- Docs: using/images (the bases the layer works on), using/from (Alpine's
  unpinned packages, what's tested), internals/images (OpenRC's service,
  xz, musl), contributing.

Review (security-audit skill, guidance mode): the OpenRC service runs the
root-owned default profile's nix-daemon and reads only the root-written
/etc/conf.d/nix-daemon; xz is Alpine's own package from its signed
repositories, unpinned as every Alpine package devvm installs is, and says
so; nothing else changed in what the image or the daemon gets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 13:20:54 -07:00
..