Declare workspace source folder

I have an IDX project where I checked out a GitHub repository. I have many folders in the root of that repository. One of those folders contains a Flutter app. How can I configure Nix to tell what’s the workspace source folder? If I don’t specify it, IDX will try to find the pubspec.yaml in the root folder.

In the preview section of the nix.dev file you can specify cwd=“directory name”

2 Likes

Thanks!

I ended up fixing it like this:

previews = {
  enable = true;
  previews = {
    web = {
      command = [ "flutter" "run" "--machine" "-d" "web-server" "--web-hostname" "0.0.0.0" "--web-port" "$PORT" ];
      manager = "flutter";
      cwd = "./my-flutter-folder";
    };
  };
};
2 Likes