Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate restrict-eval #8295

Open
fricklerhandwerk opened this issue May 5, 2023 · 6 comments
Open

Deprecate restrict-eval #8295

fricklerhandwerk opened this issue May 5, 2023 · 6 comments
Assignees
Labels
settings Settings, global flags, nix.conf

Comments

@fricklerhandwerk
Copy link
Contributor

As discussed in the Nix team meeting today: #7871 (comment)

Proposal

Issue a warning when the setting is enabled and direct users to GitHub if they would be impacted by the feature being removed.

@roberth roberth added the settings Settings, global flags, nix.conf label May 31, 2023
@Artturin
Copy link
Member

Artturin commented Nov 1, 2023

restrict-eval is used by ofborg https://github.com/NixOS/ofborg/blob/de415d372959b7e6fc6b2f6c95f0c21e5010348d/ofborg/src/nix.rs#L353

(also nix >=2.16 breaks the strict_sandboxing test NixOS/ofborg#659 which seems related)

@Ericson2314
Copy link
Member

Ericson2314 commented Nov 2, 2023

@Artturin Yeah we would do something else for Hydra/Ofborg/Etc.

I suspect it perhaps could just be pure eval, with a few things to make that more versatile.

@puffnfresh
Copy link
Member

From my understanding, #9061 made it so that even the most common Nix flakes (e.g. using a github:NixOS/nixpkgs input) will stop working by default under Hydra due to restrict-eval. Users will have to specify allowed-uris Nix configuration before flakes will work.

I feel like it's important for something to be done before a release of current master.

@puffnfresh
Copy link
Member

How does this issue and the current thinking relate to #1701? Should we do one instead of the other?

@fricklerhandwerk
Copy link
Contributor Author

Arguably we can't just remove it, as current thinking seems to have converged on keeping stable interfaces stable. @NixOS/nix-team correct me if I'm wrong.

Until we have a deprecation policy as linked in the linked comment, we won't remove things that are a result of past design decisions. (Bugs in the implementation of design decisions are something else.)

In that case it would make sense to close the issue suggesting to remove restrict-eval.

@AleXoundOS
Copy link

image
If I understand correctly, it forbids access to resources like https:// during Nix code evaluation (unless they're specified in allowed-uris)? Seems to be a useful feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
settings Settings, global flags, nix.conf
Projects
None yet
Development

No branches or pull requests

6 participants