Using texlive with xelatex and polyglossia

Im trying to compile some a .tex file which contains Hebrew characters using xelatex (from texlive) and the polyglossia package and I keep receiving the error File 'bidi.sty' not found.
this is the .tex file:

% !TEX program = xelatex
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont{Noto Sans Hebrew}[Script=Hebrew] % also tried without this line but the error persists.
\begin{document}
א
\end{document}

and this is how I installed texlive in my /nixos/configuration.nix file:

environment.systemPackages = with pkgs; [
  ....
    (texlive.combine { inherit (texlive) scheme-medium bidi; }) # Ive also tried adding polyglossia here but it did not resolve the issue.
  ....
];

Hi,

(I edited your message to format the code properly)

When you don’t have enough packages in medium, you can try with full.

This flake is seems to be working with nix develop --command xelatex main.tex:

{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

  outputs =
    { nixpkgs, ... }:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in
    {
      devShells.${system}.default = pkgs.mkShell { packages = [ 
        pkgs.texlive.combined.scheme-full
      ]; };
    };
}

With medium, I had to add bidi and zref:

devShells.${system}.default = with pkgs; mkShell { packages = [ 
  (texlive.combine { inherit (texlive) scheme-medium bidi zref; })
]; };

Thank you very much for the help and for formatting the message.
I am very new to nixos so I have not made use of flakes in the past, Ive tried adapting what you wrote to /etc/nixos/configuration.nix but now Ive ran into another issue which I suspect is related to the font.
when trying to compile main.tex I now get the error xdvipdfmx:fatal: Invalid font: -1 (0)
these are the changes I made to my configuration.nix:

  fonts.packages = with pkgs; [
    noto-fonts
  ];
  environment.systemPackages = with pkgs; [
    (texlive.combine { inherit (texlive) scheme-full; })
    ...