I spent some time configuring my configuration.nix, and so far, everything seems to be working correctly, which means that as a newbie to NixOS, I’m missing something here.
I briefly searched here but couldn’t find any related issues.
After asking a couple of different LLM oracles (?), they both suggested:
I’d greatly appreciate it if anyone could point me to the right manual section or any other documentation where I can learn exactly how this symlinking works and how to fix it properly.
The oracles are likely correct. I can’t point you to the specific part of the documentation that talks about this, but this is what it looks like on my machine (macOS):
lrwxr-xr-x - lucian 20 Jun 2023 .nix-profile -> /nix/var/nix/profiles/per-user/lucian/profile
I also remember having this issue on a fresh install, but I never investigated what was going on.
What you’re seeing is normal and nothing to worry about.
The directory ~/.local/state/nix/profiles is where your user profiles live. If you haven’t installed anything per user yet (by doing something like niv-env -iA or nix profile install) then this directory is empty. Once you install something using the commands above, a symlink profile-1-link to the corresponding profile in the Nix Store will be created in this directory as well as a symlink profile that points to profile-1-link to make it easily available in your $PATH.