Composer Memory Limit Problem?

I tried to install Drupal with composer. I get the following error message. I tried 2 G and 4 G memorylimit, but still the problem. What can I do about it?

composer create-project drupal-composer/drupal-project:8.x-dev aygika
Installing drupal-composer/drupal-project (8.x-dev 04a3fe08d35bfdbdcb9718556fbe8181cd111ff0)

  • Installing drupal-composer/drupal-project (8.x-dev 04a3fe0): Cloning 04a3fe08d3 from cache
    Created project in aygika

DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108864 bytes) in phar:///nix/store/62y7dpr89kl0lv2znybm0kinip968n7n-php-composer-1.9.0/libexec/composer/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.