G++: error: unrecognized command-line option '-m64'

I have installed nixos on my M1 macbook pro and am using VMware fusion. I was able to successfully setup the machine but when i try to install google chrome or intellij I encounter this error: g++: error: unrecognized command-line option ‘-m64’

Would appreciate if someone could advise me on the solution for this.

Here’s the error :

/nix/store/p92r4nnm3bpylajfcvbrnha3s1zydlib-gcc-wrapper-12.2.0/bin/g++ -DCEF_USE_SANDBOX -DNDEBUG -DWRAPPING_CEF_SHARED -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -I/build/source/third_party/cef/cef_binary_104.4.26+g4180781+chromium-104.0.5112.102_linux64_minimal -O3 -DNDEBUG -fno-strict-aliasing -fPIC -fstack-protector -funwind-tables -fvisibility=hidden --param=ssp-buffer-size=4 -pipe -pthread -Wall -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-error=comment -Wno-comment -Wno-deprecated-declarations -m64 -march=x86-64 -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -std=c++14 -Wsign-compare -Wno-undefined-var-template -Wno-literal-suffix -Wno-narrowing -Wno-attributes -O2 -fdata-sections -ffunction-sections -fno-ident -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -MD -MT libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_lock.cc.o -MF libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_lock.cc.o.d -o libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_lock.cc.o -c /build/source/third_party/cef/cef_binary_104.4.26+g4180781+chromium-104.0.5112.102_linux64_minimal/libcef_dll/base/cef_lock.cc
g++: error: unrecognized command-line option ‘-m64’
ninja: build stopped: subcommand failed.
error: builder for ‘/nix/store/4r569bhy16p7mi19awi141nqbhz2gigk-jcef-jetbrains-654.drv’ failed with exit code 1
error: 1 dependencies of derivation ‘/nix/store/hrlrldqbdgk9m1j7g1d56klb23ngjcfy-jetbrains-jdk-jcef-17.0.7-b829.16.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/dahi0pkc9x8pw7yhxrpbg0j6syjzlsq9-idea-ultimate-2023.1.2.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/rdqvghsdrncysn1vn1iib5j3cmpg8k8l-system-path.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/dk5gb216bdba28bw8y49ihccp2n5nzbh-nixos-system-uzi-23.05.4172.bd1cde45c778.drv’ failed to build