Setting `nixpkgs.hostPlatform.gcc.arch` makes `nixos-rebuild` fail

Since I am already compiling some of my packages I thought that I’ll make them better for my hardware.

I have read the wiki on how to do it and I wanted to try x86_63-v3.
When I set that I get this behavior:

# nixos-rebuild test 
error:
       … while evaluating the attribute 'config'

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          323|         _module = checked (config._module);

       … while calling the 'seq' builtin

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

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

       error: attribute 'system' missing

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/systems/default.nix:73:81:

           72|       # Prefer to parse `config` as it is strictly more informative.
           73|       parsed = parse.mkSystemFromString (if args ? config then args.config else args.system);
             |                                                                                 ^
           74|       # Either of these can be losslessly-extracted from `parsed` iff parsing succeeds.
building Nix...
error:
       … while evaluating the attribute 'config'

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          323|         _module = checked (config._module);

       … while calling the 'seq' builtin

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

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

       error: attribute 'system' missing

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/systems/default.nix:73:81:

           72|       # Prefer to parse `config` as it is strictly more informative.
           73|       parsed = parse.mkSystemFromString (if args ? config then args.config else args.system);
             |                                                                                 ^
           74|       # Either of these can be losslessly-extracted from `parsed` iff parsing succeeds.
building the system configuration...
error:
       … while evaluating the attribute 'config.system.build.toplevel'

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |         ^
          323|         _module = checked (config._module);

       … while calling the 'seq' builtin

         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:

          321|         options = checked options;
          322|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          323|         _module = checked (config._module);

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

       error: attribute 'system' missing

       at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/systems/default.nix:73:81:

           72|       # Prefer to parse `config` as it is strictly more informative.
           73|       parsed = parse.mkSystemFromString (if args ? config then args.config else args.system);
             |                                                                                 ^
           74|       # Either of these can be losslessly-extracted from `parsed` iff parsing succeeds.

I have read this post and I don’t think it’s related.
I also recall one closed PR or issue on this but I can’t find it.
Why does this happen? Can this be fixed?

EDIT: Possibly related:

Please share all your config related to nixpkgs.hostPlatform.
(Perfect example of why not to rely on the wiki, btw)

$ nixos-option nixpkgs.hostPlatform
Value:
{
  aesSupport = false;
  androidNdkVersion = null;
  androidSdkVersion = null;
  avx2Support = false;
  avx512Support = false;
  avxSupport = false;
  canExecute = <LAMBDA>;
  config = "x86_64-unknown-linux-gnu";
  darwinArch = "x86_64";
  darwinMinVersion = "10.12";
  darwinMinVersionVariable = null;
  darwinPlatform = null;
  darwinSdkVersion = "10.12";
  efiArch = "x64";
  emulator = <LAMBDA>;
  emulatorAvailable = <LAMBDA>;
  extensions = {
    executable = "";
    library = ".so";
    sharedLibrary = ".so";
    staticLibrary = ".a";
  };
  fma4Support = false;
  fmaSupport = false;
  gcc = { };
  hasSharedLibraries = true;
  is32bit = false;
  is64bit = true;
  isAarch = false;
  isAarch32 = false;
  isAarch64 = false;
  isAbiElfv2 = false;
  isAlpha = false;
  isAndroid = false;
  isArmv7 = false;
  isAvr = false;
  isBSD = false;
  isBigEndian = false;
  isCompatible = <LAMBDA>;
  isCygwin = false;
  isDarwin = false;
  isEfi = true;
  isElf = true;
  isFreeBSD = false;
  isGenode = false;
  isGhcjs = false;
  isGnu = true;
  isILP32 = false;
  isJavaScript = false;
  isLinux = true;
  isLittleEndian = true;
  isLoongArch64 = false;
  isM68k = false;
  isMacOS = false;
  isMacho = false;
  isMicroBlaze = false;
  isMinGW = false;
  isMips = false;
  isMips32 = false;
  isMips64 = false;
  isMips64n32 = false;
  isMips64n64 = false;
  isMmix = false;
  isMsp430 = false;
  isMusl = false;
  isNetBSD = false;
  isNone = false;
  isOpenBSD = false;
  isOr1k = false;
  isPower = false;
  isPower64 = false;
  isRedox = false;
  isRiscV = false;
  isRiscV32 = false;
  isRiscV64 = false;
  isRx = false;
  isS390 = false;
  isS390x = false;
  isSparc = false;
  isSparc64 = false;
  isStatic = false;
  isSunOS = false;
  isUClibc = false;
  isUnix = true;
  isVc4 = false;
  isWasi = false;
  isWasm = false;
  isWindows = false;
  isi686 = false;
  isiOS = false;
  isx86 = true;
  isx86_32 = false;
  isx86_64 = true;
  libDir = "lib64";
  libc = "glibc";
  linker = "bfd";
  linux-kernel = {
    autoModules = true;
    baseConfig = "defconfig";
    name = "pc";
    target = "bzImage";
  };
  linuxArch = "x86_64";
  parsed = {
    abi = {
      assertions = [
        {
          assertion = <LAMBDA>;
          message = ''
            The "gnu" ABI is ambiguous on 32-bit ARM. Use "gnueabi" or "gnueabihf" instead.
          '';
        }
        {
          assertion = <LAMBDA>;
          message = ''
            The "gnu" ABI is ambiguous on big-endian 64-bit PowerPC. Use "gnuabielfv2" or "gnuabielfv1" instead.
          '';
        }
      ];
      name = "gnu";
    };
    cpu = {
      arch = "x86-64";
      bits = 64;
      family = "x86";
      name = "x86_64";
      significantByte = {
        name = "littleEndian";
      };
    };
    kernel = {
      execFormat = {
        name = "elf";
      };
      families = { };
      name = "linux";
    };
    vendor = {
      name = "unknown";
    };
  };
  qemuArch = "x86_64";
  rust = {
    cargoEnvVarTarget = "X86_64_UNKNOWN_LINUX_GNU";
    cargoShortTarget = "x86_64-unknown-linux-gnu";
    isNoStdTarget = false;
    platform = {
      arch = "x86_64";
      os = "linux";
      target-family = [ "unix" ];
      vendor = "unknown";
    };
    rustcTarget = "x86_64-unknown-linux-gnu";
    rustcTargetSpec = "x86_64-unknown-linux-gnu";
  };
  rustc = { };
  sse3Support = false;
  sse4_1Support = false;
  sse4_2Support = false;
  sse4_aSupport = false;
  ssse3Support = false;
  system = "x86_64-linux";
  ubootArch = "x86_64";
  uname = {
    processor = "x86_64";
    release = null;
    system = "Linux";
  };
  useAndroidPrebuilt = false;
  useLLVM = false;
  useiOSPrebuilt = false;
}

Also setting cpu.arch causes the rebuild to fail