Skip to content

Move Nix tool store dir #7339

Description

@TheColorman

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Priority

    Low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions