I have really large files I want to create in a derivation, so would like to use nix build in a custom nix store. The problem I am facing is that i can’t two stores at the same time. But I really would like to have store A (default /nix/store on nvme) to contain my executable, and my TB-heavy data on store B on HDD. Is there any way to accomplish that? I see that the nix cache mostly returns store paths without the /nix/store prefix, so I think it’s probably not easily possible, since it isn’t supported. Has anyone alternative Ideas on how to proceed? Currently my only approach is to disable the sandboxing and write the files onto my system manually.
I believe what you’re looking for is an overlay store, this is currently an experimental feature: Experimental Local Overlay Store - Nix 2.34.7 Reference Manual
1 Like