Installing extensions in Project IDX using dev.nix configuration file - not working

Could you help me with Project IDX. Version: 1.89.1. Browser: Chrome.
I want to have googlecloudtools.cloudcode extension installed using dev.nix configuration file. I have dev.nix like this:

{ pkgs, ... }: 
{
  channel = "stable-24.05";
  packages = [
    pkgs.python313
  ];
  idx.extensions = [
      "googlecloudtools.cloudcode"
  ];
}

Unfortunatelly, this command does not install this extension at initialization environment phase of Project IDX startup what I observe on the Extensions list where “Gemini Code Assist + Google Cloud Code” has to be still installed.

The same is happening to other extensions I tried.
Meanwhile the package python313 installs correctly, what I can check from Terminal.
No errors show up during IDX startup.

I don’t want workarounds (I found them) but I just want to understand how dev.nix works or does not work.

One of workaround is to use Extension Panel on the left in IDX UI and there find and install “Gemini Code Assist + Google Cloud Code” manually.

Another workaround is to delay the extension installation by using a post-initialization script (env parameter) in dev.nix file (–install-extension googlecloudtools.cloudcode after a short delay). This works, but still this is the workaround for me.

Gemini sent me to official Project IDX documentation and support channels for the most accurate and up-to-date information.

Here I am. Is it possible to have extension installed using idx.extensions parameter in dev**.nix** file? And if so, what am I missing?

1 Like

Did you ever find a solution to this? I am encountering the same issue when trying to install Cline AI editor.

There may be a version mismatch between what is available on Nix and what is available via the extensions marketplace. Let me flag this as something for our team to investigate once they are back from the holidays next week.

I didn’t find the solution. I do it manually in Extension Panel on the left in IDX UI.

I have this same issue, the relevant sections of my dev.nix are below if it helps troubleshooting

 channel = "stable-24.05"; # or "unstable"

  # Use https://search.nixos.org/packages to find packages
  packages = [
    pkgs.go
    pkgs.gnumake    
    pkgs.python311
    pkgs.python311Packages.pip
    pkgs.google-cloud-sdk
    pkgs.kubectl
    pkgs.k9s
  ];

  # Sets environment variables in the workspace
  env = {};
  idx = {
    # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
    extensions = [
      "golang.go"
      "ms-python.python"
      "ms-azuretools.docker"
      "github.vscode-github-actions"
    ];

Did you get anywhere with this? I am having the same issue I’ve flagged more details in a separate comment here

1 Like