Util-linux not giving access to commands

Im getting the following

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error:
       … <borked>

         at «none»:0: (source not available)

       … while calling the 'import' builtin

         at «string»:1:18:

            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) ]; } ""
             |                  ^

       (stack trace truncated; use '--show-trace' to show the full trace)

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

       at «none»:0: (source not available)

But running nix-info -m

 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.95, NixOS, 23.11 (Tapir), 23.11.20240624.90bd1b2`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(mainuser): `"home-manager-23.05.tar.gz"`
 - channels(root): `""`
 - nixpkgs: `not found`