Docker
Enabling the docker service
Inside your configuration.nix
:
{
...
virtualisation.docker.enable = true;
}
Adding users to the docker
group will provide them access to the socket:
{
users.users.<myuser>.extraGroups = [ "docker" ];
}
Building a docker image with nixpkgs
There is an entry for dockerTools in the nixpkgs manual for reference. In the nixpkgs repo some examples can be found.