I’m reading the 11th nix pill about garbage collection. There, it says:
Turns out, that /nix/var/nix/gcroots/profiles is a symlink to /nix/var/nix/profiles
However, on my system I have:
[corentin@nixos-qemu-vm:~]$ ls -l /nix/var/nix/gcroots/profiles
lrwxrwxrwx 1 root root 25 Dec 8 13:40 /nix/var/nix/gcroots/profiles -> /mnt/nix/var/nix/profiles
But what is /mnt/nix/var/nix/profiles? The whole /mnt directory is missing from my system:
[root@nixos-qemu-vm:/home/corentin]# ls /mnt
ls: cannot access '/mnt': No such file or directory
[root@nixos-qemu-vm:/home/corentin]# ls /mnt/nix/var/nix/profiles
ls: cannot access '/mnt/nix/var/nix/profiles': No such file or directory
Is there some magic around /mnt in NixOS? For what it’s worth:
I noticed this and wondered about it too. I wonder if it is from during the install, at which point /mnt made sense. I’ll try and see by doing a different install.
I can reproduce it with a brand new NixOS install, and it was mounted at /newsys, so the symlink ends up being /nix/var/nix/gcroots/profiles -> /newsys/nix/var/nix/profiles. I did use my own NixOS installer ISO, but I don’t think that makes much of a difference.
I followed the official install guide which tells users to mount the new root
at /mnt so that would explain why it’s /mnt in my case. I used the NixOS
installer ISO.