Closed ghostbuster91 closed 1 year ago
Which is presumably because the NIX_PATH environment variable is not set.
I don't think these paths would be checked if the environment variable was not set.
It looks like they're set by PAM from /etc/pam/environment
Do you know how that could be fixed?
It looks like the channel is defined
[root@bpir3:~]# nix-channel --list
nixos https://nixos.org/channels/nixos-unstable
After I run the following it populates
[root@bpir3:~]# nix-info
system: "aarch64-linux", multi-user?: no, version: nix-env (Nix) 2.13.3, nixpkgs: not found
[root@bpir3:~]# nix-channel --update
unpacking channels...
[root@bpir3:~]# nix-info
system: "aarch64-linux", multi-user?: yes, version: nix-env (Nix) 2.13.3, channels(root): "nixos", nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
Looking into it, it looks like it's normally pre-populated on "installation media" via <nixpkgs>/nixos/modules/installer/cd-dvd/channel.nix
.
It's not very obvious, but it looks like that is intended to be included in "golden images" as well, and it takes care of doing a one-time command at boot to set it up to a copy of nixpkgs in the nix-store included in the filesystem.
This was an interesting one, it looks like I never ran into this one because I manage the device entirely via nix-command (nix shell instead of nix-shell) and flakes, and my in-service router still doesn't have those channel links.
Thanks for the explanation, updating channel information fixed the issue :+1:
Hi,
Whenever I try to use
nix-index
ornix-shell
and such I am getting following error:Which is presumably because the
NIX_PATH
environment variable is not set. I guess that the reason why it is not set is that the nixos was never "installed" but rather we are running an "installation disk"(?).Do you know how that could be fixed?
My desktop nixos reports:
However these paths do not exist on the bananpi nixos.