diff --git a/pkgs/build-support/docker/examples.nix b/pkgs/build-support/docker/examples.nix index 29eea33a7e18..eb89a2e3c2e1 100644 --- a/pkgs/build-support/docker/examples.nix +++ b/pkgs/build-support/docker/examples.nix @@ -117,7 +117,12 @@ rec { pkgs.nix ]; config = { - Env = [ "NIX_PAGER=cat" ]; + Env = [ + "NIX_PAGER=cat" + # A user is required by nix + # https://github.com/NixOS/nix/blob/9348f9291e5d9e4ba3c4347ea1b235640f54fd79/src/libutil/util.cc#L478 + "USER=nobody" + ]; }; };