Nix using store in /var, bind mount?

I have a server where I have enough space available on /var, but not on the root filesystem, and I want to install Nix on that machine. Can I just install it, then move /nix to /var/nix-store and then bind-mount /var/nix-store to /nix?

yes you can, the same way iso uses ro-store and rw-store in overlayfs

1 Like