Trouble with nixos-container --config-file

Playing around with nixos-container and hit a snag. Using the following (straight from the manual) creates a self-contained configuration in /var/lib/containers/foo/etc/nixos/configuration.nix:

# nixos-container create foo --config '
   services.openssh.enable = true;
   users.users.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"];
 '
# cat /var/lib/containers/foo/etc/nixos/configuration.nix
{ config, lib, pkgs, ... }:
with lib;
{ boot.isContainer = true;
  networking.hostName = mkDefault "foo";
  networking.useDHCP = false;
  services.openssh.enable = true;
  users.users.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N..."];
}

But specifying the extra configuration on the command line like that becomes impractical as the config becomes larger. The --config-file option looks like the logical solution. Only it doesn’t work because it tries to import the file from outside the container rather than injecting the file into the nix store and importing it:

$ cat <<EOF > /tmp/example.nix
{ ... }:
{
  services.openssh.enable = true;
  users.users.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N..."];
}
EOF
# nixos-container update foo --config-file /tmp/example.nix
# cat /var/lib/containers/foo/etc/nixos/configuration.nix
{ config, lib, pkgs, ... }:
with lib;
{ boot.isContainer = true;
  networking.hostName = mkDefault "foo";
  networking.useDHCP = false;
  imports = [ /tmp/example.nix ];
}

This surprising behavior suggests that I don’t now how to use --config-file properly. Or perhaps is it a misfeature of --config-file. Would someone please tell me what I should be doing to configure a nixos-container with a large configuration?