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

nix: Fix haveInternet to check for proxy #10067

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

ramboman
Copy link
Contributor

Motivation

haveInternet should check if a proxy is available. If it is, it must return true so nix could function properly. See #10017 for more details.

Context

Fixes: #10017

/etc/systemd/system/nix-daemon.service.d/override.conf is used by nix-daemon and not necessarily by nix. If nix needs to download something without going through the daemon, it can only be done if proxy environment variables are defined. haveProxyEnvironmentVariables check for these variables.

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added the new-cli Relating to the "nix" command label Feb 23, 2024
Just for consistency with the rest
Copy link
Member

@thufschmitt thufschmitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I've just tweaked the getenv call a bit to make it more consistent with the rest, will merge as soon as the CI is green

@thufschmitt thufschmitt merged commit accae60 into NixOS:master Feb 23, 2024
8 checks passed
@ramboman ramboman deleted the fix-proxy-nix branch February 23, 2024 16:49
tebowy pushed a commit to tebowy/nix that referenced this pull request Jul 11, 2024
`nix`: Fix `haveInternet` to check for proxy

(cherry picked from commit accae60)
Change-Id: I996dafdcd266f4bc5806386c86b19040120842bf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-cli Relating to the "nix" command
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Nix uses only sources when installing packages from behind proxy
2 participants