PHP with Imagemagick setup

I’m trying to setup a small slimPHP api to test imagemagick functions, but I’m having no success configuring IDX to install imagic:

It builds the container and opens the webpage, but fails saying ImageMagic module is not installer

here is the full idx/dev.nix

# see: https://developers.google.com/idx/guides/customize-idx-env
{ pkgs, ... }: {
  # Which nixpkgs channel to use.
  channel = "stable-23.11"; # or "unstable"
  # Use https://search.nixos.org/packages to find packages
  packages = [
    pkgs.imagemagick
    pkgs.php83 
    pkgs.php83Packages.composer
    pkgs.phpExtensions.imagick 
  ];
  # Sets environment variables in the workspace
  env = {};
  idx = {
    # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
    extensions = [
      "rangav.vscode-thunder-client"
    ];
    workspace = {
      onCreate = {
        # Open editors for the following files by default, if they exist:
        default.openFiles = ["index.php"];
      };
      # Runs when a workspace is (re)started
      onStart= {
        run-server = "php -S localhost:3000 public/index.php";
      };
    };
  };
}

can somebody save me?