I worked around this issue by pinning Docker itself to an earlier version, courtesy of tomgray on Github:
# pin docker to older nixpkgs: https://github.com/NixOS/nixpkgs/issues/244159
nixpkgs.overlays = [
(let
pinnedPkgs = import(pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "b6bbc53029a31f788ffed9ea2d459f0bb0f0fbfc";
sha256 = "sha256-JVFoTY3rs1uDHbh0llRb1BcTNx26fGSLSiPmjojT+KY=";
}) {};
in
final: prev: {
docker = pinnedPkgs.docker;
})
];
I simply pasted this in configuration.nix
next to virtualisation.docker.enable = true;
and it’s a little bit nicer than pinning the entire nixpkgs
to an earlier version.
In a little while when the fix gets pushed through I’ll remove this snippet again.