How cloudwatt/nix-container-images works
This repository builds declarative Docker images from NixOS-style configurations. The principal workflow is a consumer configuration passed to lib.makeImage, which defines image attributes and incorporates reusable system modules; the resulting image can run a command directly or use s6 as PID 1. Documented capabilities also include s6-managed services, partial systemd-service compatibility, Nix configuration, and a predefined Nix image. Source excerpts were unavailable, so relationships are limited to those described in the README.
Main entry points: make-image.nix Image builder · s6.nix s6 services · systemd.nix Systemd compatibility · nix.nix Nix image
Components 13
Image creation
- Image builder
lib/make-image.nix - Image options
modules/image.nix
System configuration
- System module
modules/system.nix - System paths
modules/system-path.nix - Nix configuration
modules/nix-daemon.nix - Module compatibility
modules/fake.nix
Service management
- s6 services
modules/s6.nix - s6 helpers
modules/s6-lib.nix - Systemd compatibility
modules/systemd.nix
Predefined images
- Nix image
images/nix.nix
Other components
- Image author
- s6 runtime
- Docker image
Connections 9
- Image author → Image builder: configures via
README.md - Image builder → Image options: accepts image config
README.md - Image author → s6 services: defines services
README.md - Systemd compatibility → s6 services: maps services to
README.md - s6 services → s6 runtime: runs services with
README.md - Image builder → Docker image: builds
README.md - Image author → System module: reuses NixOS modules
README.md - Image author → Nix configuration: configures Nix
README.md - Nix image → Image builder: built as image
README.md