Environment Variables

I am trying to make a go project using goodle idx ide. But there is something I cannot solve. How can I add environment variable. Example: JWT_KEY etc.

You can add env variables in .idx/dev.nix. I have a small example below but check the docs for a complete file. Customize your IDX workspace  |  Project IDX  |  Google for Developers

{ pkgs, ... }: {

  # Which nixpkgs channel to use.
  channel = "stable-23.11"; # or "unstable"

  # Use https://search.nixos.org/packages to find packages
  packages = [
    pkgs.nodejs_18
  ];

  # Sets environment variables in the workspace
  env = {
    JWT_KEY = "key-value";
  };
}