How does one build lxc images with nixos-generators?

My configuration looks something like described in this issue.

I tried lots of things but I always get the same error

error:
       … while evaluating the attribute 'config.system.build."${(image).config.formatAttr}"'
         at /nix/store/0vzw30bmdik5zd1mj6cr88z9773a5ra3-source/lib/modules.nix:334:9:
          333|         options = checked options;
          334|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          335|         _module = checked (config._module);

       … while calling the 'seq' builtin
         at /nix/store/0vzw30bmdik5zd1mj6cr88z9773a5ra3-source/lib/modules.nix:334:18:
          333|         options = checked options;
          334|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          335|         _module = checked (config._module);

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'formats' missing
       at /nix/store/0vzw30bmdik5zd1mj6cr88z9773a5ra3-source/nixos/modules/services/hardware/bluetooth.nix:29:12:
           28|
           29|   cfgFmt = pkgs.formats.ini { };
             |            ^
           30|

I was able to generate a new error message by beeing closer to the readme. The flake.nix now looks like this:

{
  description = "Flake to create vs-code-server-container image";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/release-24.11";
    nixos-generators = {
      url = "github:nix-community/nixos-generators";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    vscode-server.url = "github:nix-community/nixos-vscode-server";
  };

  outputs = { nixpkgs, self, nixos-generators, ... }:
  let
    inputs = self.inputs;
    pkgsForSystem = system: import nixpkgs {
      inherit system;
    };
    allVMs = [ "x86_64-linux" "aarch64-linux" ];
    forAllVMs = f: nixpkgs.lib.genAttrs allVMs (system: f {
      inherit system;
      pkgs = pkgsForSystem system;
    });
  in {
    packages = forAllVMs({ system, pkgs }: rec {
      default = vs-code-server-container;
      vs-code-server-container = nixos-generators.nixosGenerate {
        system = system;
        specialArgs = {
          pkgs = pkgs;
        };
        format = "lxc";
        modules = [
          {
            nix.registry.nixpkgs.flake = nixpkgs;
            boot.isContainer = true;
            nixpkgs.pkgs = pkgs;
          }
          ./configuration.nix
          inputs.vscode-server.nixosModules.default
        ];
      };
    });
  };
}

And the error like this:

error:
       … from call site
         at /nix/store/gs7ribxc3hiqmipi236mkbcs6a80hxby-source/flake.nix:27:34:
           26|       default = vs-code-server-container;
           27|       vs-code-server-container = nixos-generators.nixosGenerate {
             |                                  ^
           28|         system = system;

       … while calling 'nixosGenerate'
         at /nix/store/wpi4gfnmh1qk9m27n7jr6apainxdkvqs-source/flake.nix:64:23:
           63|
           64|       nixosGenerate = {
             |                       ^
           65|         pkgs ? null,

       … while evaluating the attribute 'config.system.build."${(image).config.formatAttr}"'
         at /nix/store/0vzw30bmdik5zd1mj6cr88z9773a5ra3-source/lib/modules.nix:334:9:
          333|         options = checked options;
          334|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          335|         _module = checked (config._module);

       … while calling the 'seq' builtin
         at /nix/store/0vzw30bmdik5zd1mj6cr88z9773a5ra3-source/lib/modules.nix:334:18:
          333|         options = checked options;
          334|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          335|         _module = checked (config._module);

       … while calling the 'throw' builtin
         at /nix/store/0vzw30bmdik5zd1mj6cr88z9773a5ra3-source/lib/modules.nix:310:18:
          309|                     ''
          310|             else throw baseMsg
             |                  ^
          311|         else null;

       error: The option `nixpkgs.system' does not exist. Definition values:
       - In `/nix/store/0vzw30bmdik5zd1mj6cr88z9773a5ra3-source/nixos/lib/eval-config.nix':
           {
             _type = "override";
             content = "x86_64-linux";
             priority = 1000;
           }