Containers
Enables Docker-based container runtime defaults.
Purpose
Provide a Docker-backed container runtime for workloads that still rely on Docker-specific features, with automatic image pruning and persistent state.
Entry Point
- Main file: containers.nix
Options
core.containers.enable
| Type | boolean |
| Default | false |
| Example | true |
Whether to enable container support.
Architecture / Services / Scope
When enabled, the module:
- enables
virtualisation.dockerwith the default Docker package, - enables CDI device support in the Docker daemon,
- enables weekly automatic image pruning,
- sets
virtualisation.oci-containers.backend = "docker", - adds
dockertocore.defaultGroups, and - persists Docker state directories under
/var/lib/docker(overlay storage, images, volumes, containers, containerd, and buildkit data).
Operational Notes / Assumptions
- Docker is intentionally preferred because current workloads still need features not covered by Podman or
podman-compose. - Users receive Docker access through the shared
core.defaultGroupshandling.