Skip to content

Separate stores for evaluation, building and storing the result #5025

@edolstra

Description

@edolstra

For several use cases it would be useful to distinguish between the stores used to store .drv files, to build derivations, and to store the resulting closure.

For example:

  • nix path-info --store https://cache.nixos.org nixpkgs#hello doesn't work because the evaluation of nixpkgs#hello tries to create .drv files in cache.nixos.org.
  • For NixOps, we want to do evaluation on the local machine, do builds on some arbitrary machines (could be the local machine, the destination machine, or some other builder) and store the result in the destination machine.
  • If /nix/store is a high-latency remote store (as with flox), then copying lots of little .drv files to the remote is slow. So it's better to evaluate locally and only copy .drv closures to the remote as needed and in a single round-trip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXThe way in which users interact with Nix. Higher level than UI.remote buildThe SSH store, ssh:, ssh-ng:, ... (split from protocol label 2024-07)schedulingsettingsSettings, global flags, nix.confstoreIssues and pull requests concerning the Nix store

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions