Hi,
I have seen a post on stack overflow asking about how to combine multiple drives for the nix store, and one of the suggestions in the comments was to use mergerfs, and I liked that idea, but I don’t know what’s the way to do it properly. do I need to change the store location to something like /storage
where the drives are combined then somehow point to it in my nixos config? or can I just combine the /nix/store
with something else and make it somehow store it in /nix/store
what I tried to do:
fileSystems."/nix/store" = {
fsType·=·"fuse.mergerfs";
device·=·"/media/extra/nix-store:/nix/store";
options·=·["cache.files=partial"·"dropcacheonclose=true"·"category.create=mfs"\];
};
but that didn’t work, I’m guessing it doesn’t make sense that mergerfs would merge /nix/store
into itself, so that’s fair
but what if I want to do this:
fileSystems."/storage" = {
fsType·=·"fuse.mergerfs";
device·=·"/media/extra/nix-store:/nix/store";
options·=·["cache.files=partial"·"dropcacheonclose=true"·"category.create=mfs"\];
};
how do I point the nix store to /storage
on my whole system?
or what’s the proper way to do this using mergerfs?