Skip to content

Don't reverse proxy hydra.nixos.org #1130

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

Open
mweinelt opened this issue Apr 28, 2025 · 4 comments
Open

Don't reverse proxy hydra.nixos.org #1130

mweinelt opened this issue Apr 28, 2025 · 4 comments
Labels
site Improvements to the site infrastructure or content presentation

Comments

@mweinelt
Copy link
Member

mweinelt commented Apr 28, 2025

Observations

in ccc6d2d you started telling netlify to reverse proxy the nix manuals directly from hydra.nixos.org

Problem

This became a problem when we started using Anubis for dealing with automated abusive requests. The reverse proxied site then served a broken validation page, that would never complete the validation steps.

Approaches

Fetch the documentation packages and host them yourself.

Willing to help?

The infra team has limited resources available, but you are free to ask, if you need anything.

Timeline
NixOS/infra#663
NixOS/nix#13099 (comment)
NixOS/infra#665

Priorities

Add 👍 to issues you find important.

@mweinelt mweinelt added the site Improvements to the site infrastructure or content presentation label Apr 28, 2025
@Mic92
Copy link
Member

Mic92 commented Apr 29, 2025

Assuming the build is cheap, this could be moved to github actions:

$ nix-build
$ netlify deploy --dir=./result --prod --site=<YOUR_NETLIFY_SITE_ID> --auth=$NETLIFY_AUTH_TOKEN

We should avoid hitting hydra with more load than necessary.

@vcunat
Copy link
Member

vcunat commented Apr 29, 2025

It should be cheap: if it used to pull from hydra.nixos.org, a local build would substitute it from cache.nixos.org.

@Mic92
Copy link
Member

Mic92 commented Apr 29, 2025

Well likely it won't be cached at this point yet. But if building a static website would be expensive slow, I think there would be something else to worry about.

@fricklerhandwerk
Copy link
Collaborator

fricklerhandwerk commented Apr 29, 2025

Building the Nix manual is atrociously expensive, because it requires building all of Nix: NixOS/nix#8518

This is why we have this contraption to fetch only cached builds for each release. Running that update script is also rather expensive, this is also why the development version points directly to Hydra.

Ideally we'd catch a webhook and grab the built tarball of the manual directly, since the development version should be available ASAP and is ephemeral (there's no point in re-building nix.dev for it). But we'd need control over the web server for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site Improvements to the site infrastructure or content presentation
Projects
Status: No status
Development

No branches or pull requests

4 participants