Getting nix-path issue when installing nixos via archlinux

i am doing a partition install of Nixos with archlinux acting as the Host OS.

i have enabled nix-daemon, added my user to nix-users, created a nixbld user and added to the nixbld group. i installed nix via the official archlinux package.

for channels i have added nixos-25.05 to the channels under the alias of nixos and ran nix-channel --update. doing nix-channel --list gives:

nixos https://nixos.org/channels/nixos-25.05

at the step in the manual when installing nixos to the mounted partition running ‘sudo PATH=“$PATH” which nixos-install --root /mnt’ give me:

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

so i am wondering should i create the $NIX_PATH as reading the issue linked in the archwiki it seems to cause issues?

Name the channel nixpkgs, or add an entry in NIX_PATH redirecting nixpkgs to nixos: NIX_PATH="nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:$NIX_PATH"

That entry exists by default on nixos systems, so you may see examples some places that assume it exists.

added the channel under the alias nixpkgs did not work still getting the same issue

Did you run nix-channel --update afterwards?

yes i ran nix-channel --update.

Can you printenv NIX_PATH and post it here?

typing echo $NIX_PATH prints nothing

Oh, you just installed the nix package, right? Try starting a new shell, and check the variable again.

no i installed the nix package a while ago over several reboots as i had a bit of difficulty getting things setup for the nixos partition. just tried reinstalling the nix package and still nothing under $NIX_PATH

Hmm… there’s also a nix-path option that can be set in /etc/nix/nix.conf. If the env var is unset, that’s used. Is it there?

that file only lists build-users-group = nixbld

Then the arch package is not reasonably built. Which lines up with what I’ve heard secondhand. The general consensus I hear from the nix community is that you just shouldn’t use it.

That said, you can probably power through this by setting NIX_PATH manually. The channels are in /nix/var/nix/profiles/per-user/*/channels somewhere (depending on which user you ran nix-channel as).

alright, i will keep this in mind, i am going to try to install nix via the official script since i haven’t used it much except installing the nixos-install-tools