What is the correct way to set NIX_PATH with home-manager on Ubuntu

I have the following setup, a WSL1 with Ubuntu.
On it home-manager is installed through a flake.

In addition I have some work related projects which contain a shell.nix file.
On NixOS they work just fine however on the WSL I get the following error:

error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

Since I couldn’t find an option for nixPath in home-manager I’ve set the environment variable directly:

 home = {
    sessionVariables = {
      NIX_PATH = "nixpkgs=${inputs.nixpkgs}";
    };
};

It works, however is this the correct way to do it?