Thanks primeos. This is what my NIX_PATH looks like
[jason@nixos:~]$ echo $NIX_PATH
But the segmentation fault should still not happen (probably caused by a
default.nix file in your home directory).
Your intuition on this was correct. I can actually use nix-shell from any directory except for my home.
These are the files in my home directory right now with nix in their name. Ill try removing them one by
one and seeing which one is causing the problem.
[nix-shell:~]$ ls -la | grep -i nix
drwxr-xr-x 2 jason users 4096 Apr 6 15:55 .nix-defexpr
drwxr-xr-x 9 jason users 4096 Apr 1 21:54 nixpkgs
lrwxrwxrwx 1 jason users 44 Feb 23 19:22 .nix-profile -> /nix/var/nix/profiles/per-user/jason/profile
lrwxrwxrwx 1 jason users 59 Mar 3 18:03 result -> /nix/store/yf6l0yy5n2ssfnz1rkizvc6lfznhrzg4-krita-22.214.171.124
hmm I moved all those files to a folder called test. And home directory nixpkgs still segfaulted. But then I noticed there were some other files -A --attr, and -p in my home directory that I assume were there by accident. Once I removed those home directory nix-shell worked. I still don’t quite understand what was happening but it seems to be solved thanks for your help. I don’t think I would have solved this with out it.