Skip to content

Make Nix configure itself better when it runs in the sandbox #8698

Open
@roberth

Description

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

When running nix inside the nix sandbox, users have to perform a lot of nontrivial setup just to get instantiation to work.

Describe the solution you'd like

Nix should detect that it is run in the sandbox, and then adapt (some of) its default configuration to comply with the restrictions.

It should not automatically relocate its store, as that would be a problem for

It should configure --offline when it is in the sandbox and it is not a fixed-output derivation sandbox.

This might necessitate extra environment variables that are set in the sandbox.

Describe alternatives you've considered

  • Add generic test setup logic to Nixpkgs, as tests could use a relocated store anyway, but this wouldn't help RFC 92

  • Try to set --offline in Nixpkgs.

Additional context

Priorities

Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposalsettingsSettings, global flags, nix.conf

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions