Skip to content

A very restricted recursive nix socket in the sandbox #8602

Open
@roberth

Description

Is your feature request related to a problem? Please describe.

  • For RFC 92 dynamic derivations we want to add derivations to the store from within the sandbox. While writing a derivation text to a predefined location such as $out would get the job done for a single derivation, the real power comes from adding multiple derivations. After all, if you're going to produce only one derivation, you might as well "inline" the work - not that useful.
  • When running nix inside the nix sandbox, users have to perform a lot of nontrivial setup just to get instantiation to work (EDIT: this is also Make Nix configure itself better when it runs in the sandbox #8698, but I haven't removed this aspect from the issue because there's a strong interaction)

Describe the solution you'd like

  • A very restricted recursive nix socket in the sandbox, supporting addToStore and little else, if anything
  • An environment variable that's set in the sandbox configures nix with a default store that behaves correctly

If both solutions apply in all derivations, that would significantly improve the user experience for testing.

Describe alternatives you've considered

Without considering RFC 92, we could view as a goal: easier setup of a separate store in the sandbox. In other words, we could make this setup easier.

Additional context

Priorities

Add 👍 to issues you find important.

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

    UXThe way in which users interact with Nix. Higher level than UI.featureFeature request or proposalrecursive-nixThe recursive-nix experimental featuresandboxHow we isolate build impurities and protect the hostsettingsSettings, global flags, nix.confstoreIssues and pull requests concerning the Nix storetests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions