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

bug: Can't build homemanger on GCP hosted node due to sourcehut block. #6498

Open
2 tasks done
jq-bb opened this issue Feb 19, 2025 · 0 comments
Open
2 tasks done

bug: Can't build homemanger on GCP hosted node due to sourcehut block. #6498

jq-bb opened this issue Feb 19, 2025 · 0 comments
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@jq-bb
Copy link

jq-bb commented Feb 19, 2025

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

I can't build home manager as it pulls code from sourcehut in the derivation itself:
https://git.sr.ht/~rycee/nmt/archive/v0.5.1.tar.gz

At the moment, these pulls are being blocked (my servers don't have a public ip to whitelist)

We have unilaterally blocked several cloud providers, including GCP and Azure, for the high volumes of bot traffic originating from their networks. If you have a legitimate reason to access SourceHut from these networks, you must email support to request an exception. Explain your use-case and provide the affected IP addresses.

https://status.sr.ht/issues/2025-01-23-git.sr.ht-ddos/

According to the last issue: #6354

That said, nmt should not be fetched at all when simply using the flake,

This is not the case for me? Is there a setting that I can set in home manager to make it pull this from the flake inputs as expected?

Workaround

In the mean time, this is my workaround (literally embedding the tar into my infra repository) but this is not great as the fix does not persist and often I have to rerun this command to get working a home manager.

nix-prefetch-url --unpack --name source file:///$(pwd)/misc/nmt-v0.5.1.tar.gz

I don't even really need the error fixed per say, it just would be really nice to have some workaround for this sourcehut pull, especially for users running in GCP or Azure.

Actual Error:

       … while calling the 'head' builtin
         at /nix/store/mma8n3yfap91nw44hfcfyl18ffv5hl68-source/lib/attrsets.nix:1574:11:
         1573|         || pred here (elemAt values 1) (head values) then
         1574|           head values
             |           ^
         1575|         else

       … while evaluating the attribute 'value'
         at /nix/store/mma8n3yfap91nw44hfcfyl18ffv5hl68-source/lib/modules.nix:816:9:
          815|     in warnDeprecation opt //
          816|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          817|         inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/mma8n3yfap91nw44hfcfyl18ffv5hl68-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `system.systemBuilderArgs':

       … while evaluating definitions from `/nix/store/mma8n3yfap91nw44hfcfyl18ffv5hl68-source/nixos/modules/system/activation/activatable-system.nix':

       … while evaluating the option `system.activationScripts.etc.text':

       … while evaluating definitions from `/nix/store/mma8n3yfap91nw44hfcfyl18ffv5hl68-source/nixos/modules/system/etc/etc-activation.nix':

       … while evaluating definitions from `/nix/store/mma8n3yfap91nw44hfcfyl18ffv5hl68-source/nixos/modules/system/etc/etc.nix':

       … while evaluating the option `environment.etc.dbus-1.source':

       … while evaluating the option `environment.systemPackages':

       … while evaluating definitions from `/nix/store/mma8n3yfap91nw44hfcfyl18ffv5hl68-source/flake.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: Failed to open archive (Source threw exception: error: unable to download 'https://git.sr.ht/~rycee/nmt/archive/v0.5.1.tar.gz': HTTP error 403

              response body:

              <html>
              <head><title>403 Forbidden</title></head>
              <body>
              <center><h1>403 Forbidden</h1></center>
              <hr><center>nginx</center>
              </body>
              </html>)

Maintainer CC

@rycee

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.6.76, NixOS, 24.11 (Vicuna), 24.11.20250213.0b73e36`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.12`
 - nixpkgs: `/nix/store/h3g3hcnwm00lhr41fj9d9ahy002d6h7k-source`
@jq-bb jq-bb added bug triage Issues or feature request that have not been triaged yet labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

4 participants