Nix is a package manager and builder, and has static references to the entire build and runtime dependency trees in the Nix store, which is placed at /nix/store by default. Since these paths are static, all instances of Nix must use /nix/store as the store directory to take advantage of caching.
The Nix tool in containerbase changes the nix store to $(get_cache_path)/nix/store, making it practically unusable as the entire dependency tree needs to be built from source (see this explanation in a fork of renovate).
This can be solved in 2 ways:
- Use the canonical
/nix/store path for the Nix tool.
- Use a local store, which makes Nix to use chroot to place the target directory at the chroot's
/nix/store path. This requires mount and user namespaces.
Nix is a package manager and builder, and has static references to the entire build and runtime dependency trees in the Nix store, which is placed at
/nix/storeby default. Since these paths are static, all instances of Nix must use/nix/storeas the store directory to take advantage of caching.The Nix tool in containerbase changes the nix store to
$(get_cache_path)/nix/store, making it practically unusable as the entire dependency tree needs to be built from source (see this explanation in a fork of renovate).This can be solved in 2 ways:
/nix/storepath for the Nix tool./nix/storepath. This requires mount and user namespaces.