Is github going to tighten the noose?

Yep, I’m very much in favour of moving off of GitHub. Me highlighting “less contributions” was merely a consequence to be considered.

Also errata: When I say drive off contribution, I mean smaller bits of contributions spread across a large mass of infrequent contributors. I’d, of course, expect the heavy lifters of the nixpkgs community to stick around just the same either way.

1 Like

Yeah, both the effort to learn enough Nix to contribute and the effort to tolerate our median case of review process are higher than creating yet another account (as long as it is login-password-optional-recovery-email, not some monstrosity).

3 Likes

Most of that is BS. You’re misunderstanding how any of the distro machinery works, from nix, to builds, to releases. You’re demanding things that make no sense.

Everything built by hydra is already hashed and signed, and the nixpkgs expressions are published on https://channels.nixos.org/nixos-26.05/nixexprs.tar.xz (signed through TLS). GitHub is not the canonical source (in fact, it is incomplete).

Hydra is centralized, but nix caches are not. You can use any substituter you like, including your own self-hosted one, today. You can also use none. Projects exist to prove the validity of hydra’s artifacts, so the impact of compromise is limited (and could not be eliminated by allowing more writers to the same cache). This is in no way inferior to what other distros do.

There is no static release image, or other artifact, that an individual could sign. The live images are built continuously and signed by hydra. The rest are the package expressions which bump automatically when hydra tests pass (and are also verified by the hydra machinery).

Some distros make package maintainers sign individual package artifacts, but this spreads risk of compromise additively, unlike hydra’s case which is constant, or in other words, more build machines means more risk of compromise. You don’t want to use a browser binary compiled on my npm-infested laptop. NixOS permits full local builds if you’re worried about even the risk represented by hydra, which is better mitigation than what you get on most other distros (and using it is exactly as painful as you’d expect - hydra exists for a reason).

Not that NixOS is more secure, but that is because we mitigate other risks much worse, not because the technical aspect of supply chain security is worse.

If you’re struggling with GitHub ratelimits for NixOS that’s because you’re cargo culting.

If you’re struggling with GitHub ratelimits for third party projects (including when building locally, most software is unfortunately hosted on GitHub, so building your own packages will make you fetch from there) you also depend on you’re complaining to the wrong people.

The only dependency on GitHub is for contributions, which is far from the continuity risk being implied here. Just use the official source, not GitHub.

The contribution aspect is indeed valid, but technically offtopic, since the origin of the thread seems to be someone not using the official expression source (otherwise there would be no ratelimits).

10 Likes

thanks for the detailed response. i’m not quite sure what you disagree on. my point is that centralized services like github, hydra, and s3 are useful, and that our trust chain should be a layer above them, and nix could continue to operate even if they’re hostile, compromised or unavailable.

Here’s a fun thought exercise: Could you trust NixOS if you could not trust Sectigo Limited?
You may be surprised to find this company you never heard of is part of the trust model.

I am not familiar with this issue, but would like to understand a bit more. Who is struggling with rate limits and what are they cargo culting?

1 Like

Read the first post in this thread. The complaint is that GitHub is rate limiting updates. For that to happen you have to be cargo culting this innocuous-looking snippet:

{
  inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
}

To use the official sources, it should look like this:

{
  inputs.nixpkgs.url = "https://channels.nixos.org/nixos-26.05/nixexprs.tar.xz";
}

This is a mistake introduced with flakes; originally, they did not support the channel URLs, so everyone started using GitHub as their source, and the habit stuck around even now that we have support for the channel URLs. nix-channel has always derived trust exclusively from nixos.org; it’s kinda like flakes are still a bit half-baked since nobody has sat down to clean up the whole distribution model (and flakes are not primarily designed to facilitate a distro).

My entire point is that your reply misunderstands most of NixOS’ trust model. You are making broad demands of a process you don’t understand well enough to criticize. You seemingly didn’t even read the first post in the thread.


As for this reply, yes, the trust for channel expressions are ultimately derived from a root CA, but it’s not sectigo, the issuer is let’s encrypt.

All trust eventually derives from the nixpkgs expressions, since all source expressions include hashes, and - if you choose to use the official binary cache - the hydra signing cert is also included in them.

Everything except the nixpkgs expressions is already decentralized. Technically the nixpkgs expressions are already decentralized, too, there are even mirrors of them (such as GitHub, but there’s also a Chinese university which hosts a mirror).

It’d be interesting to sign the channel expressions with hydra’s key as well. That way you could bootstrap trust from CAs, but on an installed system rely on hydra’s key. AIUI it already builds this tarball and signs it, there’s just no way to use the hydra artifact as an input; with an extension of the channels protocol we could probably add an extra signature that doesn’t derive from CAs.


That said, I think the benefit of this would be very marginal. Nixpkgs contributors as a rule do not check sources on version bumps, let alone verify commit signatures or source hashes. Most package bumps are automated besides a cursory glance at a PR. The development process entirely relies on TLS. Heck, forget TLS, most of this is done by Anthropic at this point, people are too lazy to even run fully automated scripts by hand.

If you want a distro that isn’t subject to CA failure (or Anthropic deciding to attain world domination), you’ll have to create a new distro with very different contribution requirements, and guidelines for which packages are even acceptable. It’d look a lot more like debian. Compromising let’s encrypt’s certificate is definitely not the easiest way to break nixpkgs’ supply chain.

6 Likes

thanks again for the detailed response, the original poster asked about a strategy to mitigate github issues, which is what I was proposing. but let’s consider more practical short term solutions.

Scenario: I’ll count external hits from your flake
We’re using github/codeberg to perform two distinct operations:

  1. Name resolution: github/repo/commits/HEAD → c034234…
    e.g: GET https://api.github.com/repos/NixOS/nixos-hardware/commits/master
    or : GET https://github.com/NixOS/nixos-hardware.git/info/refs?service=git-upload-pack

  2. Byte delivery: github/repo/archive/sha.tar.gz
    e.g: GET https://github.com/NixOS/nixos-hardware/archive/<sha>.tar.gz
    or : POST https://github.com/NixOS/nixos-hardware.git/git-upload-pack
    POST BODY: have: 9c1b.... (your commits); want: 3f2a... (what you want)

Possible solutions:

  1. Migrate our ‘cargo culted’ docs to guide users away from the pattern.
    Result: We lessen the load on github from 13 to 11 per host.
    Note: Github may start counting additional things

  2. Setup an off-github name resolution cache (like #1 but for most ecosystem repos) We could run it from as http or even as a dns to use global caches: e.g:
    before:
    GET https://api.github.com/repos/gmodena/nix-flatpak/commits/latest
    after:
    dig +short TXT latest.nix-flatpak.gmodena.refs.githash.dev
    rev=<sha>; observed=2026-0...; sig=<base64-ed25519-signature>; v=1

  3. Use a simple chain protocol (e.g IPNS, Nostr, SSBC) + p2p
    e.g: on commit a message like the following is generated and aggregated:
    Commit 0xcafe; Tag: latest; ts:2025; signed by: achille
    Peers can also chare bytes. You don’t need to trust sha → bytes resolution… because you can verify them yourself.

in my opinion it’s inevitable that in the future we won’t pay twice to ship data to a remote site (or to mars for that matter). If you have three machines at home and one of the machines has all the bytes that match your pin, then the data should flow from that machine. It would be slow and wasteful if we didnt.

0: Nixpkgs with github:nixos

reqs | apiq | dest
-----+------+-----------------------
  13 |   13 | api.github.com
  13 |    0 | github.com
  13 |    0 | codeload.github.com
   0 |    0 | channels.nixos.org
   0 |    0 | releases.nixos.org
   1 |    0 | codeberg.org
-----+------+-----------------------
  40 |   13 | TOTAL


1: Nixpkgs with url

reqs | apiq | dest
-----+------+-----------------------
  11 |   11 | api.github.com
  11 |    0 | github.com
  11 |    0 | codeload.github.com
   2 |    0 | channels.nixos.org
   2 |    0 | releases.nixos.org
   1 |    0 | codeberg.org
-----+------+-----------------------
  38 |   11 | TOTAL


2: githash resolution

reqs | apiq | dest
-----+------+-----------------------
   0 |    0 | api.github.com
  11 |    0 | refs.githash.dev
  11 |    0 | github.com
  11 |    0 | codeload.github.com
   2 |    0 | channels.nixos.org
   2 |    0 | releases.nixos.org
   1 |    0 | codeberg.org
-----+------+-----------------------
  38 |    0 | TOTAL

3: P2P (e.g peerix, nostr, etc)

reqs | apiq | dest
-----+------+-----------------------
   0 |    0 | api.github.com
   0 |    0 | github.com
   0 |    0 | codeload.github.com
   0 |    0 | channels.nixos.org
   0 |    0 | releases.nixos.org
   0 |    0 | codeberg.org
  14 |    0 | nostr (internal refs)
  14 |    0 | p2p (internal blobs)
-----+------+-----------------------
  28 |    0 | TOTAL

2 Likes

(Small interjection to note that I’ve fixed that case you pointed out on the wiki. Thanks for doing so, I thought I’d found most of them but evidently not. Please keep pointing them out as you find them :))

2 Likes

Yes, the projects downloaded there are not NixOS, which is why I say:

Your LLM added nothing to the discussion, I had already explained this. It’s conflating the distro with the ecosystem, which is not helpful and simply moving goalposts. Also, please follow the LLM policy.

As much as I agree that it’d be nice if we got away from GitHub as a collaboration platform, the NixOS project itself does not depend on GitHub for anything else.

Trying to motivate every project on GitHub to move away from the platform is a much, much more difficult thing to do, but you can create mirrors where licenses permit.

4 Likes

for the record, nlnet i think would be receptive to proposals to help get nixpkgs off github

3 Likes

yes! perfect, let’s manifest it!

yes would be nice, this is the github enshittification* era
it is an incredibly expensive product in terms of energy
alternatives can be incredibly fast & more efficient if modeled on first principle.
we have orders of magnitude of optimizations ahead

I’m not familiar with your LLM policy.
Here’s my claude session, you can see everything.

Ok, but who is paying? I don’t think we ended up at centralised services by accident. Someone has to pay, with time or money (and when it comes to availability and bandwidth you can’t substitute money unfortunately).

Work will, where wishing won’t.

we’re paying a lot in terms of raw energy (PWh) and we’re paying in spirit.

energy cost: (current)
attach a meter and measure an entire lifecycle, nixos installation, boot, updates, weekly,monthly,yearly. nix writes a ton of data and uses a ton of bandwidth.
read the meter: that’s our baseline, let’s say it’s 10kWh for a month per desktop.

that’s an insanely large ‘budget’ we’re energy rich!,
we can do amazing things with just 1% of that.

spirit cost: (current)
github and co are entering a death loop. their costs are increasing, their software sales are declining, the only moat left is data. which they’re training on by default.

they’re squeezing us into accounts so they can better model your ‘spirit’, merge all the auth signals, and your comments, your commits. we’ll be squeezed into an increasingly abusive relationship until we walk out.

that data is worth a lot, and it’s currently serving github, not us. After mailing me a notice saying they’ll train on my data I filed a CCPA data access request for a copy of it – they acknowledge the data exists but they don’t have the operational capacity to comply with the regulations.

future energy cost
we’ll all share the load, as a distributed, peer to peer network. Individuals, institutional servers.

Nice dodge. I am talking about who is going to pay for this glorious future that doesn’t involve GitHub. You can’t pay for disk and bandwidth with your spirit. Also fwiw I’m not going to respond to the next LLM-nonsense filled post. I want to talk to you, not your agent.

attach a meter and measure an entire lifecycle, nixos installation, boot, updates, weekly,monthly,yearly. nix writes a ton of data and uses a ton of bandwidth.
read the meter: that’s our baseline, let’s say it’s 10kWh for a month per desktop.

??? I want you to reread this and please try help me to understand what you are trying to say?

Are you honestly trying to relate the cost of running my computer with nixos to whether nixpkgs/nixos should be hosted on GitHub or not? And argue that by decentralising this process my computer in my house is going to be more efficient?

3 Likes

That is 100% my own typing, maybe you can ping me on Discord and talk over voice? How does anyone here trust they’re talking to a human?!

Yes! Exactly. Here’s an example, Uber moved their container image delivery from a centralized server to a p2p system. See Kraken. They claim this gives them ‘Massive performance improvements’.

I’m saying that there’s a computational cost to Nix right now, and that computational cost can be measured in terms of energy. Each node in the Uber Kraken system performs more (costs more energetically) but overall the system is vastly more efficient.

I’m saying it’s more efficient for you to copy a package from a peer close to you (maybe another machine of yours or a coworker).

1 Like

but 99.99% of my computers energy is not spent evaluating nix is, it? It’s a rounding error. So that’s a really weak argument. Unless someone does nothing but evaluate nix all day long, pulling 40mb once a week is nothing (my channel zstd tar is 38.5MiB, 26.05). Spending 30 seconds evalutating and 10m building? Also nothing. Note though: big builds are cache misses, which really has nothing to do with github or p2p anyway, and everything to do with free/unfree or broken builds. For instance I have a kernel patch for one of my laptops. That alone dwarfs every energy concern possible for my usage, because it triggers a 40m build when the kernel bumps.

The idea that there is some huge amount of energy to be saved using a p2p distribution does not stand up to scrutiny. I honestly also don’t really care for the uber example for a simple reason: they have an incredibly dense fan out inside their DCs, thousands of machines on the same LAN fabric, all equipped with multi-gigabit NICs on the same LAN. Do you? Most people are going to have a couple of machines at most. I’m telling you that using one streaming service in your house will absolutely dwarf every saving you can make in terms of energy. You might get your builds distributed quicker, but that’s a different argument. It also is a question of substitution and binary cache, not the git host for development.

When developing Kraken, we explored multiple design choices along the way to end up with a P2P architecture. Kraken uses a P2P protocol tailored to a data center network environment and improves microservice lifecycle management at the enterprise level.

Kraken supports pluggable storage options, and instead of managing data blobs, Kraken plugs into reliable blob storage options like S3, HDFS, or another registry. The storage interface is simple, and new options are easy to add.

Oh look, P2P distribution based on object storage (which is what the main cache already runs on) and optimised for datacentre networking (which is not applicable to the majority of nix consumers). And those people that do have it are honestly quite likely to use use a VPC gateway for S3 and run their own cache (speaking from experience of running nix in the enterprise).

I apologise about the LLM thing.

1 Like

NixOS is very energy inefficient compared to most other distributions, however it’s also uniquely positioned to be one of the first that can decentralize.

This has not been the case. in my n1 personal experience. e.g entering a simple dev shell would frequently download 2+ gb of updates, sometimes weekly.

I just crunched some numbers, and on average our cache serves ~6PB of data per month, which works out to ~3-4GB/week per user for approx ~500,000 users (& their ci/agents/etc.)

Your laptop’s kernel only needs to be built once, then everyone that shares your hardware could share that derivation. Your laptop spent ~5Wh to compute the output of a function that converts source-space to binary-space. It would cost ~0.2 Wh to get that derivation via p2p. It only needs to be computed once.

It’s 25x! more efficient to share.

2 Likes

In theory. In practice you can share your binary, but nobody should ever accept it; there is no way to assert that you’re not handing out malware like candy instead of the binary you’re promising.

If you want to set up third party build networks*, you can, nothing is stopping you (which is why the claim that hydra serves as some kind of monopolistic central entity is absurd), but the distro default should never include caches just anyone can write to.

Unless we want a much worse version of what happened to the AUR recently, of course (well, at least the packages are signed, but presumably people would just trust all signatures, given what happened with the AUR).

*I don’t have links, but projects to assert hydra isn’t publishing hardware by independently building packages and comparing them exist. These can in theory be used to make stuff like @bme’s kernel more trustworthy. In practice, you need a certain amount of build replication to be able to trust such caches, meaning that the overhead of this is almost certainly way higher than the two people who happen to have the exact same circumstances and update cadence building independently.


If you want to do development with isolated build dependencies, yes, you will have to carry multiple sets of disjoint compilers and libraries, and if you update those regularly, you will churn many gigabytes. There’s no way around that.

That’s different from using NixOS as a distro, though. This is you asking for this behavior, if you just used NixOS as a distro, or pinned your inputs to your active OS, you’d see much smaller networking demand.

NixOS does indeed churn more because nix rebuilds full subtrees anytime anything changes instead of just rebuilding nodes, but development use cases are a very different story (and bordering on moving goalposts again).


You can already run and use your own substituters, today. Plenty of people in the ecosystem do this, to the point that we’re making PSAs about this being inadvisable because you’re trusting too many individuals with no controls.

NixOS isn’t even unique in this, there are deb and rpm repositories besides the ones published by debian and fedora. NixOS’ alternate caches are just way more popular because they’re easier to use and not tied to package expressions.

If you want to set up a cache on your LAN, just do that. If you want to set up a shared cache for your hackerspace, just do that. If you want to host a cache on IPFS that any Joe can write to and infest the world with malware, just do that. Nix’ substituters are configurable.

7 Likes

I understand the skepticism, these are all solvable problems.
Might be helpful to separate distribution & trust

nix.settings = {
  substituters        = [ "https://joes-p2p" ]; // <- how I get bytes (distribution)
  trusted-public-keys = [ "joes-candy:0x004" ]; // <- are the bytes good (trust) 
};

There are many options for this, here’s a few:

I don’t see anything wrong w/ swapping bytes with Joe – as long as I can verify the final bytes cryptographyically. If joe can deliver me hydra-signed bytes or if I can check the attestation against Intel’s public key etc

Oh interesting this is my first time encountering hardware-enforced attestable build processes so I’m sure I’m misunderstanding a great deal but the premise looks very cool.

One thing that I really couldn’t figure out and that is important for the idea of regular Joe’s sharing build artifacts – is it possible to do this type of attestation on most consumer-grade hardware today (not necessarily in nix)? Alternatively do most CI pipelines on common source forges have the ability and/or does the hardware that hydra currently runs on have this potential?

there’s many different options at various security levels, but you can have hardware-based attestation running on a $50 chromebook thats ~10 years old.


3 Likes