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)
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.
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
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