On 2024-02-27 04:20:02, Walter Bleach wrote: > > This is my first time trying out nix, however I could not get it to > work. > > ~$ sudo nix-shell -p cowsay > [sudo] password for farhad: > error: file 'nixpkgs' was not found in the Nix search path (add it using > $NIX_PATH or -I)
Do you want to run this as root (sudo)? If you add your user to the nix-users group, I think you should be able to run `nix-shell -p cowsay` as your user without sudo. (Assuming you also added a channel like mention in the nix-channel man page.) Oh, I also manually added this in ~/.bashrc: if [ -e "$HOME/.nix-defexpr/channels" ]; then export NIX_PATH="$HOME/.nix-defexpr/channels${NIX_PATH:+:$NIX_PATH}" fi This seems like something we might want to consider handling in the nix debian packaging by updating /etc/profile.d. (Or, at least mention in /usr/share/doc/nix-bin/README.Debian.) -Jordan
signature.asc
Description: signature