-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add trust-tarballs-from-git-forges setting #10340
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,6 @@ struct FetchSettings : public Config | |
)", | ||
{}, true, Xp::Flakes}; | ||
|
||
|
||
Setting<bool> useRegistries{this, true, "use-registries", | ||
"Whether to use flake registries to resolve flake references.", | ||
{}, true, Xp::Flakes}; | ||
|
@@ -94,6 +93,22 @@ struct FetchSettings : public Config | |
empty, the summary is generated based on the action performed. | ||
)", | ||
{}, true, Xp::Flakes}; | ||
|
||
Setting<bool> trustTarballsFromGitForges{ | ||
this, true, "trust-tarballs-from-git-forges", | ||
R"( | ||
If enabled (the default), Nix will consider tarballs from | ||
GitHub and similar Git forges to be locked if a Git revision | ||
is specified, | ||
e.g. `github:NixOS/patchelf/7c2f768bf9601268a4e71c2ebe91e2011918a70f`. | ||
This requires Nix to trust that the provider will return the | ||
correct contents for the specified Git revision. | ||
If disabled, such tarballs are only considered locked if a | ||
`narHash` attribute is specified, | ||
e.g. `github:NixOS/patchelf/7c2f768bf9601268a4e71c2ebe91e2011918a70f?narHash=sha256-PPXqKY2hJng4DBVE0I4xshv/vGLUskL7jl53roB8UdU%3D`. | ||
)"}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be marked experimental (under There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it should be experimental. It could be removed (made a no-op) in the future if it's no longer needed. After all, what's the experimental behaviour? The "true" or "false" case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't there for the rest of the call Monday, but I consider this thing mostly a monkey patch because the other stuff for the fetchers hasn't been done yet. In the end I think:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why wouldn't it be experimental? It only makes sense as part of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's already implicitly behind |
||
|
||
}; | ||
|
||
// FIXME: don't use a global variable. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a promise, which we should be careful about, especially in reference docs, but some expectation management is in order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have to document that requirements could be loosened in the future, since that wouldn't break anything.