I’m using Nix (multi-user) on Ubuntu and i’m currently getting
error: opening lock file '/nix/var/nix/profiles/per-user/.../profile.lock': No such file or directory, when trying to install something like
nix-env -i nix-prefetch-git. It’s likely because the
/nix/var/nix/profiles/per-user/ directory doesn’t contain a subdirectory for my user. What’s responsible for creating per-user subdirectories there? What could be causing it to not happen?
My setup is a bit unconventional in that the
$HOME is mounted on an NFS drive (shared with other hosts), but i can’t figure out why that would matter. There are a few other hosts where Nix is working fine (also with
$HOME on NFS), but on others i’m getting the above error (which were likely set up some time after the working hosts).
To investigate, i re-installed Nix on one of the failing hosts (removing Nix stuff first as instructed by the installer). But that also didn’t help - now i get
error: creating directory '/nix/var/nix/profiles/per-user/...': Permission denied when doing anything with