nix icon indicating copy to clipboard operation
nix copied to clipboard

warning: Nix search path entry error: … <borked> (no per-user profile)

Open markkimsal opened this issue 2 years ago • 6 comments

Platform

  • [ x ] Linux: Ubuntu 22.04
  • [ ] macOS
  • [ ] WSL

Similar Issues. Not sure if I should open new or comment on those others?

https://github.com/NixOS/nix/issues/7937 https://github.com/NixOS/nix/issues/2982

Additional information

Just installed 2.16.1 as multi-user, with my own user on ubuntu 22.04 (no sudo install, just ./install), it only created a channel for root.

mark@localhost:/tmp/nix-2.16.1-x86_64-linux$ ./install --daemon

another shell

mark@localhost:~$ nix-shell -p cowsay lolcat
warning: Nix search path entry '/nix/var/nix/profiles/per-user/mark/channels/nixpkgs' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/mark/channels' does not exist, ignoring
error:

Output

Installer seemed to finish normally

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo systemctl restart nix-daemon.service

to start the nix-daemon.service

Alright! We're done!
Try it! Open a new terminal, and type:

  $ nix-shell -p nix-info --run "nix-info -m"

Thank you for using this installer. If you have any feedback or need
help, don't hesitate:

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community

---- Reminders -----------------------------------------------------------------
[ 1 ]
Nix won't work in active shell sessions until you restart them.

How do i get a 'per-user' directory for "mark", and not for "root"?

$ ls -al /nix/var/nix/profiles/per-user/
total 0
drwxr-xr-x 1 root nixbld   8 Jul 24 08:18 .
drwxr-xr-x 1 root nixbld  30 Jul 24 08:18 ..
drwxr-xr-x 1 root root   116 Jul 24 08:18 root

markkimsal avatar Jul 24 '23 12:07 markkimsal

Can you include the full error message in your 2nd code block?

abathur avatar Jul 24 '23 23:07 abathur

warning: Nix search path entry '/nix/var/nix/profiles/per-user/mark/channels/nixpkgs' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/mark/channels' 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 = [ (cowsay) (lolcat) ]; } ""
             |                  ^

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

markkimsal avatar Jul 25 '23 11:07 markkimsal

Same issue on Kubuntu 23.04 and on Arch. Arch even has a bug opened for this: https://bugs.archlinux.org/task/78828

Worth noting that nix shell nixpkgs#cowsay nixpkgs#lolcat works just fine (but does require enabling some experimental settings).

SandaruKasa avatar Aug 17 '23 22:08 SandaruKasa

Same issue on Kubuntu 23.04 and on Arch. Arch even has a bug opened for this: https://bugs.archlinux.org/task/78828

Worth noting that nix shell nixpkgs#cowsay nixpkgs#lolcat works just fine (but does require enabling some experimental settings).

Works for me now

SandaruKasa avatar Sep 22 '23 20:09 SandaruKasa

(copied from #2982)

I'm getting a similar issue:

$ nix-shell -p nix-info --run "nix-info -m"
warning: Nix search path entry '/nix/var/nix/profiles/per-user/fishy/channels/nixpkgs' 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)

it's indeed not under /nix/var/nix/profiles/per-user/fishy/channels/ (which is empty):

$ ls -l /nix/var/nix/profiles/per-user/fishy/channels/
total 0

but I have been using it fine, somehow?

$ nix-channel --list
nixpkgs https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --update nixpkgs
unpacking channels...
$ echo $NIX_PATH
nixpkgs=/nix/var/nix/profiles/per-user/fishy/channels/nixpkgs:/nix/var/nix/profiles/per-user/fishy/channels

so my nixpkgs channel was added in a weird way?

fishy avatar Jan 04 '24 18:01 fishy

No workaround found?

astrale-sharp avatar Oct 12 '24 07:10 astrale-sharp